ruby on rails 环境搭建
建议参考:http://ruby-china.org/wiki/install_ruby_guide
以下为自我摸索安装
1、安装ruby
sudo apt-get install ruby1.9.1
完成后,输入ruby -v,查看ruby的版本
参考:http://www.ruby-lang.org/en/downloads/
2、安装RubyGems
RubyGems is the standard Ruby package manager. It's similar to apt-get, emerge, and other OS package managers. Download
http://rubygems.org/pages/download
Download from above.
Unpack into a directory and cd there
Install with: ruby setup.rb (you may need admin/root privilege)
注意权限问题,如果没有权限,请授权,或者使用root
3、 安装rails
gem install rails --include-dependencies
结果老报错:
Building native extensions. This could take a while...ERROR: Error installing rdiscount:ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- mkmf (LoadError)from <internal:lib/rubygems/custom_require>:29:in `require'from extconf.rb:1:in `<main>'