Ruby on Rails Tutorial 第2版

在线阅读:http://railstutorial-china.org/

英文版:http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

本人环境:

windows7下用VirtualBox装的Ubuntu 13.04

第一章 从零到部署

安装rvm,这样就能自由的切换ruby版本

apt-get  install curl
#安装rvm
curl -L https://get.rvm.io | bash
#启动rvm
source /home/mafei/.rvm/scripts/rvm
Installing RVM to /home/mafei/.rvm/
Adding rvm PATH line to /home/mafei/.bashrc /home/mafei/.zshrc.
Adding rvm loading line to /home/mafei/.bash_profile /home/mafei/.zprofile.
Installation of RVM in /home/mafei/.rvm/ is almost complete: * To start using RVM you need to run `source /home/mafei/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows. # mafei,
#
# Thank you for using RVM!
# I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne # In case of problems:
# run and read: rvm notes
# read docs: http://rvm.io/
# talk to us: http://webchat.freenode.net/?channels=rvm (http://freenode.net/faq.shtml#plusr)
# read cheatsheet: http://cheat.errtheblog.com/s/rvm
# watch screencast: http://screencasts.org/episodes/how-to-use-rvm
# open a bug report: https://github.com/wayneeseguin/rvm/issues * WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/home/mafei/.bash_profile': source ~/.profile

执行到

gem install rails --version 4.0. --no-ri --no-rdoc

安装rails报错

/home/mafei/.rvm/gems/ruby-2.0.-p247@railstutorial_rails_4_0/gems/atomic-1.1./lib/atomic/ruby.rb
Building native extensions. This could take a while...
/home/mafei/.rvm/rubies/ruby-2.0.-p247/bin/ruby extconf.rb
creating Makefile
make
compiling atomic_reference.c
linking shared-object atomic_reference.so
make install
/usr/bin/install -c -m atomic_reference.so /home/mafei/.rvm/gems/ruby-2.0.-p247@railstutorial_rails_4_0/gems/atomic-1.1./lib/home/mafei/.rvm/rubies/ruby-2.0.-p247/lib/ruby/site_ruby/2.0./i686-linux
/usr/bin/install: 无法创建普通文件"/home/mafei/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/atomic-1.1.14/lib/home/mafei/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/i686-linux": 没有那个文件或目录
make: *** [install-so] 错误
ERROR: Error installing rails:
ERROR: Failed to build gem native extension. Building has failed. See above output for more information on the failure. Gem files will remain installed in /home/mafei/.rvm/gems/ruby-2.0.-p247@railstutorial_rails_4_0/gems/atomic-1.1. for inspection.
Results logged to /home/mafei/.rvm/gems/ruby-2.0.-p247@railstutorial_rails_4_0/gems/atomic-1.1./ext/gem_make.out

无奈,执行gem update --system ,将gem升级到最新

再次执行,安装rails成功。

启动rails server,提示

Could not find a Javascript runtime

安装nodeJS

apt-get install nodejs

Ruby on Rails Tutorial 第2版 学习笔记的更多相关文章

  1. Ruby on Rails Tutorial读书笔记-1

    只是怕忘了命令,全部撸一次,记个大概.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 安装Ruby之前,先要安装RVM: curl -L https://get.rvm.io | bas ...

  2. 【原】Learning Spark (Python版) 学习笔记(三)----工作原理、调优与Spark SQL

    周末的任务是更新Learning Spark系列第三篇,以为自己写不完了,但为了改正拖延症,还是得完成给自己定的任务啊 = =.这三章主要讲Spark的运行过程(本地+集群),性能调优以及Spark ...

  3. 【Head-First设计模式】C#版-学习笔记-开篇及文章目录

    原文地址:[Head-First设计模式]C#版-学习笔记-开篇及文章目录 最近一年断断续续的在看技术书,但是回想看的内容,就忘了书上讲的是什么东西了,为了记住那些看过的东西,最好的办法就是敲代码验证 ...

  4. C++Primer第5版学习笔记(四)

    C++Primer第5版学习笔记(四) 第六章的重难点内容         你可以点击这里回顾第四/五章的内容       第六章是和函数有关的知识,函数就是命名了的代码块,可以处理不同的情况,本章内 ...

  5. C++Primer第5版学习笔记(三)

    C++Primer第5版学习笔记(三) 第四/五章的重难点内容           你可以点击这里回顾第三章内容       因为第五章的内容比较少,因此和第四章的笔记内容合并.       第四章是 ...

  6. C++Primer第5版学习笔记(二)

    C++Primer第5版学习笔记(二) 第三章的重难点内容         这篇笔记记录了我在学习C++常用基本语法的学习过程,基本只记录一些重难点,对概念的描述不是一开始就详尽和准确的,而是层层深入 ...

  7. C++Primer第5版学习笔记(一)

    C++Primer第5版学习笔记(一) 第一.二章的重难点内容        这个笔记本主要记录了我在学习C++Primer(第5版,中文版)的过程中遇到的重难点及其分析.因为第一.二章都比较简单,因 ...

  8. javascript权威指南第6版学习笔记

    javascript权威指南第6版学习笔记 javascript数组.函数是特殊对象 看一点少一点. 3.1.4 hello.js内容是 var x=.3-.2;var y=.2-.1 console ...

  9. Docker技术入门与实战 第二版-学习笔记-10-Docker Machine 项目-2-driver

    1>使用的driver 1〉generic 使用带有SSH的现有VM/主机创建机器. 如果你使用的是机器不直接支持的provider,或者希望导入现有主机以允许Docker Machine进行管 ...

随机推荐

  1. hdu1113 Word Amalgamation(详解--map和string的运用)

    版权声明:本文为博主原创文章.未经博主同意不得转载. vasttian https://blog.csdn.net/u012860063/article/details/35338617 转载请注明出 ...

  2. 【[USACO12DEC]第一!First!】

    一个串不能成为第一的情况有两种 另外一个单词是它的前缀 在分配字母表大小关系的时候出现了矛盾的情况 第一种很好判断,一旦我们在一个单词没有匹配完之前遇到一个结束标志,那么就说明另外一个单词是它的前缀 ...

  3. pycharm设置python文件颜色

    File->Settings->Editor->Color Scheme->Python

  4. 面试准备——(二)专业知识(2)Python

    面试遇到的问题: 滴滴: 1. Python的数据结构 2. list和tuple的区别 3. list中有哪些操作?append和extend的区别? 4. list和dict的却别?dict是有序 ...

  5. HDU 1275 两车追及或相遇问题(相遇和追及公式)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1275 两车追及或相遇问题 Time Limit: 2000/1000 MS (Java/Others) ...

  6. Gradle Goodness: Profiling Information

    If we want to know more about how much time is spent in tasks we can use the --profile command-line ...

  7. hadoop-1.2.1分布式配置启动问题

    关键配置(core-site.xml 和hdfs-site.xml)(这里只是针对与HDFS,没有启动MapReduce): core-site.xml <?xml version=" ...

  8. Epub 阅读器 - iOS

    因项目需求接触的 EPub 阅读器,前前后后尝试了很多库,最后找到了个相对兼容不错的展开了调试;其中对解压缩和数据加载方面进行了改造优化,使其更加的完美; 其大概原理是首先将 epub 文件解压后得到 ...

  9. 日期格式操作,在oracle和mysql中的实现

    oracle add_months(日期格式值 , 整数n)  当整数n=12时,代表一年,向后推迟一年,若n=-12代表回退一年 如 to_char(add_months(to_date('2018 ...

  10. SASS实现代码的重用:混合器Mixin、继承

    1. 继承: @extend sass允许一个选择器,继承另一个选择器,通过@extend实现 .class1{ border: 1px solid #333; } .class2{ @extend ...