Ruby on Rails Tutorial 第2版 学习笔记
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版 学习笔记的更多相关文章
- Ruby on Rails Tutorial读书笔记-1
只是怕忘了命令,全部撸一次,记个大概.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 安装Ruby之前,先要安装RVM: curl -L https://get.rvm.io | bas ...
- 【原】Learning Spark (Python版) 学习笔记(三)----工作原理、调优与Spark SQL
周末的任务是更新Learning Spark系列第三篇,以为自己写不完了,但为了改正拖延症,还是得完成给自己定的任务啊 = =.这三章主要讲Spark的运行过程(本地+集群),性能调优以及Spark ...
- 【Head-First设计模式】C#版-学习笔记-开篇及文章目录
原文地址:[Head-First设计模式]C#版-学习笔记-开篇及文章目录 最近一年断断续续的在看技术书,但是回想看的内容,就忘了书上讲的是什么东西了,为了记住那些看过的东西,最好的办法就是敲代码验证 ...
- C++Primer第5版学习笔记(四)
C++Primer第5版学习笔记(四) 第六章的重难点内容 你可以点击这里回顾第四/五章的内容 第六章是和函数有关的知识,函数就是命名了的代码块,可以处理不同的情况,本章内 ...
- C++Primer第5版学习笔记(三)
C++Primer第5版学习笔记(三) 第四/五章的重难点内容 你可以点击这里回顾第三章内容 因为第五章的内容比较少,因此和第四章的笔记内容合并. 第四章是 ...
- C++Primer第5版学习笔记(二)
C++Primer第5版学习笔记(二) 第三章的重难点内容 这篇笔记记录了我在学习C++常用基本语法的学习过程,基本只记录一些重难点,对概念的描述不是一开始就详尽和准确的,而是层层深入 ...
- C++Primer第5版学习笔记(一)
C++Primer第5版学习笔记(一) 第一.二章的重难点内容 这个笔记本主要记录了我在学习C++Primer(第5版,中文版)的过程中遇到的重难点及其分析.因为第一.二章都比较简单,因 ...
- javascript权威指南第6版学习笔记
javascript权威指南第6版学习笔记 javascript数组.函数是特殊对象 看一点少一点. 3.1.4 hello.js内容是 var x=.3-.2;var y=.2-.1 console ...
- Docker技术入门与实战 第二版-学习笔记-10-Docker Machine 项目-2-driver
1>使用的driver 1〉generic 使用带有SSH的现有VM/主机创建机器. 如果你使用的是机器不直接支持的provider,或者希望导入现有主机以允许Docker Machine进行管 ...
随机推荐
- canvas的两个方法说明
今天在用canvas的时候,发现有两个方法比较陌生,在此记录详细说明一下. (1)文本绘制的一个方法 canvas.drawTextOnPath(text, path, hOffset, vOffse ...
- vim命令set nu
set nu:为vim设置行号 set nonu:取消vim中的行号
- fullCalendar日程管理
//日程安排 function timeTable(id){ var inner = "<div id='calendar'></div>"; $(&quo ...
- mongo数据库基础语法
http://www.runoob.com/mongodb/mongodb-create-collection.html 很详细
- mime中间件
mime中间件Demo,里面用到的有 1.path模块 //引入模块 var path=require('path'); 2.extname方法 //获取文件的扩展名 var extname=path ...
- Css中路径data:image/png;base64的用法详解 (转载)
大家可能注意到了,网页上有些图片的src或css背景图片的url后面跟了一大串字符,比如: background-image:url(data:image/png;base64, iVBORw0KGg ...
- Jquery获取select标签的值、文本方式
<script> function add(){ var prop_name=$("#prop").find("option:selec ...
- textarea中输入字数的限制
<textarea id="area" name="ss" placeholder="请输入文本内容" rows="10&q ...
- 分布式网上商城项目-solr搜索功能错误
1.RuntimeException错误 java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid ...
- 详解HTML5中的进度条progress元素简介及兼容性处理
一.progress元素基本了解 1.基本知识 progress元素属于HTML5家族,指进度条.IE10+以及其他靠谱浏览器都支持. 注释:Internet Explorer 9 以及更早的版本不支 ...