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进行管 ...
随机推荐
- c3p0整合mysql报错问题
启动报错: [com.mchange.v2.c3p0.DriverManagerDataSource] - Could not load driverClass com.mysql.cj.jdbc.D ...
- UVa 1635 - Irrelevant Elements(二项式系数 + 唯一分解定理)
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...
- 使用GraphViz画caffe网络结构图
参考http://blog.csdn.net/happynear/article/details/45440709 1. 安装pydot: sudo pip install pydot 2. 安装Gr ...
- CPP-基础:信号量
windows api 多线程---信号量 信号量(Semaphore)和互斥量一样,属于内核对象.它自动执行可用资源查询的测试,如果有可用资源,则可用资源的计数减少1,从而避免其它线程请求资源.当该 ...
- HDU 2021 发工资咯:)(最水贪心)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=2021 发工资咯:) Time Limit: 2000/1000 MS (Java/Others) ...
- react系列(三)组件间通信
组件间通信 React的基本组件元素是一个个组件,组件之间可能存在关联.组合等关系.不同的组件之间,经常会发生数据传递或者交换,我们称之为组件间通信. 根据传递的复杂程度,可以分为三种情况: 父子间通 ...
- 大数据框架-YARN
YARN(Yet Another Resource Negotiator): 是一种新的 Hadoop 资源管理器 [ResourceManager:纯粹的调度器,基于应用程序对资源的需求进行调度的, ...
- 理解AndroidX
理解AndroidX 刚刚看到自己加的一个Android群里有人问AndroidX,还是Google自己的,竟然没听说过,慌的一匹.赶紧去看了下官方文档和一些博客,对AndroidX有了如下理解 An ...
- hdu_5698_瞬间移动
有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第nn行第mm列的格子有几种方案,答案对100000 ...
- 继续深入更新shell脚本容易出错的地方
一.在shell中用到如果需要输入某些值,需要用到read -p命令 这是我写的猜数字游戏,一开始在输出的时候,屏幕上总会打印输出 "INT" 经过反复的练习才发现 双引号后面应 ...