我正在尝试在ubuntu 12.04上安装rails。我安装了它,但是当我尝试使用rails new时,它表示没有安装rails。运行gem环境后,我得到了这个输出:
ben@ben-V5-131:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.10
- RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/ben/.rvm/gems/ruby-1.8.7-p334
- RUBY EXECUTABLE: /home/ben/.rvm/rubies/ruby-1.8.7-p334/bin/ruby
- EXECUTABLE DIRECTORY: /home/ben/.rvm/gems/ruby-1.8.7-p334/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/ben/.rvm/gems/ruby-1.8.7-p334
- /home/ben/.rvm/gems/ruby-1.8.7-p334@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
ben@ben-V5-131:~$
是否可能在全局gem路径中安装rails?
答案 0 :(得分:0)
要在ubuntu 12.04上的rails上安装ruby,请关注以下博客: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm
它适用于ruby 2.0.0和rails 4.0
我的宝石环境:
- RUBYGEMS VERSION: 2.1.5
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/tao/.rvm/gems/ruby-2.0.0-p247
- RUBY EXECUTABLE: /home/tao/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
- EXECUTABLE DIRECTORY: /home/tao/.rvm/gems/ruby-2.0.0-p247/bin
- SPEC CACHE DIRECTORY: /home/tao/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/tao/.rvm/gems/ruby-2.0.0-p247
- /home/tao/.rvm/gems/ruby-2.0.0-p247@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/tao/.rvm/gems/ruby-2.0.0-p247/bin
- /home/tao/.rvm/gems/ruby-2.0.0-p247@global/bin
- /home/tao/.rvm/rubies/ruby-2.0.0-p247/bin
- /home/tao/.rvm/bin
- /usr/lib/lightdm/lightdm
- /usr/local/sbin
- /usr/local/bin`enter code here`
- /usr/sbin
- /usr/bin
- /sbin
- /bin