首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在MacOSX10.7.4上安装Rails

在MacOSX10.7.4上安装Rails
EN

Stack Overflow用户
提问于 2012-07-19 10:31:52
回答 2查看 3.2K关注 0票数 0

我试图在我的Mac机器上安装Rails。我已经安装了Xcode以及终端命令工具。

这是运行$ bundle安装后的输出,我也尝试过sudo $ sudo安装,并获得了相同的结果。

代码语言:javascript
复制
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2) 
Using Ascii85 (1.0.1) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using activesupport (3.2.6) 
Using builder (3.0.0) 
Using activemodel (3.2.6) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.6) 
Using mime-types (1.18) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Using actionmailer (3.2.6) 
Using active_reload (0.6.1) 
Using active_utils (1.0.3) 
Using json (1.7.3) 
Using money (3.7.1) 
Using activemerchant (1.21.0) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Using activerecord (3.2.6) 
Using activeresource (3.2.6) 
Using acts_as_list-rails3 (0.0.4) 
Using addressable (2.2.8) 
Using celerity (0.9.2) 
Using culerity (0.2.15) 
Using nokogiri (1.5.2) 
Using ffi (1.0.11) 
Using childprocess (0.3.1) 
Using libwebsocket (0.1.3) 
Using rubyzip (0.9.7) 
Using selenium-webdriver (2.21.0) 
Using xpath (0.1.4) 
Using capybara (0.4.1.2) 
Using jruby-jars (1.6.7) 
Using akephalos (0.2.5) 
Using ancestry (1.2.5) 
Using awesome_print (1.0.2) 
Using multi_xml (0.4.2) 
Using httparty (0.8.2) 
Using uuidtools (2.1.2) 
Using aws-sdk (1.4.0) 
Using breadcrumbs_on_rails (2.2.0) 
Using bundler (1.1.5) 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Using thor (0.15.4) 
Using railties (3.2.6) 
Using rails (3.2.6) 
Using cache-machine (0.2.1) 
Using redis (2.2.2) 
Using cache-machine-redis (0.0.1) 
Using highline (1.6.13) 
Using net-ssh (2.5.2) 
Using net-scp (1.0.4) 
Using net-sftp (2.0.5) 
Using net-ssh-gateway (1.1.0) 
Using capistrano (2.12.0) 
Using capistrano-ext (1.2.1) 
Using carrierwave (0.6.2) 
Using chronic (0.6.7) 
Using closure-compiler (1.1.6) 
Using cloudfiles (1.5.0.1) 
Using cocaine (0.2.1) 
Using coffee-script-source (1.3.3) 
Using execjs (1.4.0) 
Using coffee-script (2.2.0) 
Using coffee-rails (3.2.2) 
Using columnize (0.3.6) 
Using configuration (1.3.1) 
Using diff-lcs (1.1.3) 
Using gherkin (2.9.3) 
Using term-ansicolor (1.0.7) 
Using cucumber (1.1.9) 
Using daemons (1.1.8) 
Using dalli (2.0.3) 
Using database_cleaner (0.7.2) 
Using debugger-ruby_core_source (1.1.3) 
Installing debugger-linecache (1.1.2) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb:2:in `require': no such file to load -- debugger/ruby_core_source (LoadError)
    from extconf.rb:2


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/debugger-linecache-1.1.2 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/debugger-linecache-1.1.2/ext/trace_nums/gem_make.out
An error occured while installing debugger-linecache (1.1.2), and Bundler cannot continue.
Make sure that `gem install debugger-linecache -v '1.1.2'` succeeds before bundling.
EN

回答 2

Stack Overflow用户

发布于 2012-07-19 11:19:38

访问此职位:

https://stackoverflow.com/a/9400424/1171049

我写了一个通过自制安装RubyOnRails的指南。是安装RubyonRails的好方法。

我希望这份指南对你有帮助。

2-安装最新版本的Xcode (通过App ) 3-安装自制软件(https://github.com/mxcl/homebrew/wiki/installation) 4-安装rvm和ruby 1.9.3。遵循快速启动指南(http://beginrescueend.com/)的步骤 5-打开终端并通过自制安装mysql

代码语言:javascript
复制
    brew install mysql

阅读mysql备注的安装(在终端上),并遵循以下步骤。(创建别名、密码、启动和初始化数据库等) 6-假设rvm使用ruby版本1.9.3

代码语言:javascript
复制
    rvm use 1.9.3

7-如果你愿意,你可以创建一个宝石集(在rvm网页上解释)并使用它。

代码语言:javascript
复制
    rvm gemset create "gemset_name"

    use 1.9.3@gemset_name

8-安装钢轨

代码语言:javascript
复制
    gem install rails

9-用mysql gems创建一个应用程序

代码语言:javascript
复制
    rails new name_app -d mysql

而且起作用了!

票数 1
EN

Stack Overflow用户

发布于 2012-07-19 11:45:34

您也可以尝试在http://railsinstaller.org/上使用用于mac的Railsinstaller版本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11558928

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档