我安装了Rails,然后验证它已安装:
rfhosting:~ macuser$ rails -v
Rails 3.2.12
rfhosting:~ macuser$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0]
然后我去了我的应用程序试图运行它:
rfhosting:constructify-on-rails_ryan_072613 macuser$ rails s
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
我做了这一步,它说已经安装了许多宝石,并且再次获得了相同的结果。
我在安装时遇到一个错误,但我不知道它是什么。我没有代表所以我不能张贴图片,但这就是错误所说的:
error copying file from packed archive/Users/macuser/Downloads/RailsInstaller-1.0.4-0sx-10.7.app/contents/MacOS/installbuilder to / user/local/rvm/help/rvmrc
其他信息:
rfhosting:~ macuser$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p371]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3-p125
[ruby-]1.9.3-p194
[ruby-]1.9.3-p286
[ruby-]1.9.3-p327
[ruby-]1.9.3-p362
[ruby-]1.9.3-p374
[ruby-]1.9.3-p385
[ruby-]1.9.3-[p392]
[ruby-]1.9.3-head
[ruby-]2.0.0-rc1
[ruby-]2.0.0-rc2
ruby-head
# GoRuby
goruby
# Topaz
topaz
# TheCodeShop - MRI experimental patches
tcs
# jamesgolick - All around gangster
jamesgolick
# Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]
# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby-1.6.5.1
jruby-1.6.6
jruby-1.6.7.2
jruby-1.6.8
jruby[-1.7.3]
jruby-head
# Rubinius
rbx-1.0.1
rbx-1.1.1
rbx-1.2.3
rbx-1.2.4
rbx[-head]
rbx-2.0.testing
rbx-2.0.0-rc1
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]
# Kiji
kiji
# MagLev
maglev[-head]
maglev-1.0.0
# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head
# Opal
opal
# IronRuby
ironruby[-1.1.3]
ironruby-head
答案 0 :(得分:0)
让我们看看这是否适合你。
第1步:安装RVM
在终端输入:
curl -L get.rvm.io | bash -s stable
这会做一些事情并打印一条你可以忽略的长信息。
第2步:配置shell - 配置shell
输入rvm | head -1
预期结果:rvm is a function
输入rvm -v
预期结果近似值:
rvm 1.x.x (stable) by Wayne E. Seguin (wayneeseguin@gmail.com), Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]
步骤3:使用RVM安装Ruby 1.9.3
rvm install 1.9.3
rvm use 1.9.3
rvm --default use 1.9.3
ruby -v
预期结果近似值:
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.4.0]
答案 1 :(得分:0)
最好的方法是参考官方网站安装指南。我建议你删除它并根据官方指南重新安装。尝试:
$curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
安装完成后,运行:
$source ~/.rvm/scripts/rvm
要加载RVM的环境,请参阅:https://rvm.io/和http://guides.rubyonrails.org/getting_started.html