2012-10-22 150 views
2

我想知道您是否可以帮助我找到为什么我无法在OS X Mountain Lion的MBP上安装Ruby on Rails。这是一个奇怪的问题,我会尽可能多地给你提供信息。在Mountain Lion上安装Rails


我已经安装Ruby和它的工作在1.9.3

版本,我已经安装了红宝石的宝石,它的每一个其他宝石,我一直试图安装工作。
它的版本是1.8.24

当我运行$ sudo gem install rails它与消息回复:Successfully installed rails-3.2.8 1 gem installed

虽然当我问它rails -v返回:

`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.` 

我该怎么办?


轨道bash的文件(/usr/bin/rails)包含:

#!/usr/bin/ruby 
# Stub rails command to load rails from Gems or print an error if not installed. 
require 'rubygems' 

version = ">= 0" 
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then 
version = $1 
    ARGV.shift 
end 

begin 
    gem 'railties', version or raise 
rescue Exception 
    puts 'Rails is not currently installed on this system. To get the latest version, simply type:' 
    puts 
    puts ' $ sudo gem install rails' 
    puts 
    puts 'You can then rerun your "rails" command.' 
    exit 0 
end 

load Gem.bin_path('railties', 'rails', version) 

那一定意味着创业板的文件不存在或者是旧或损坏
我如何检查?

+0

我也满足了这个问题!什么是更新? –

+0

我没有得到它的工作我reimaged我的电脑,然后重新启动整个过程,它的工作 –

回答

0

Railsinstaller发布了OSX安装程序,尝试从git存储库https://github.com/railsinstaller(似乎有人打破了他们的官方网页)下载他们的安装程序。

+0

你们有两个相同的软件,你推荐,它没有工作 –

0

我在前一天在我的Macbook上安装了Mountain Lion。我使用Homebrew来安装RVM(并按照安装后的说明!),然后使用RVM安装最新版本的Ruby(1.9.3)。从那里我将1.9.3设置为默认值,然后运行gem install rails。到目前为止,它已经顺利运行了!

1

我首先使用了JewelryBox作为RVM,但未能按照您的情况安装Rails。然后我发现这个page并遵循指示,现在每件事情都有效。

1

用新鲜的开始安装山狮...

我尝试使用,

sudo gem install rails 

...直开箱。这给通过总结错误,

ERROR: Failed to build gem native extension. 

但是,我通过安装在Xcode的命令行工具后,这个相同的命令成功,

Xcode 4.5.2 -> Preferences -> Download -> Components 

我比安装命令行工具没有其它的变化。

相关问题