0
尝试在 OS X 10.8 上安装 RoR。Mac 和 RoR 的新手!

遵循这里的指示:
http://www.justinball.com/2012/10/22/install-rvm-on-mac-osx-mountain-lion/

已安装 XCode、命令行工具、XQuartz、Homebrew、gcc、最新 RVM,已执行
“rvm pkg install openssl”,最后是“rvm install 1.9.3”

在此过程中出现了一些错误消息,我稍后会提供。
但是,根据以下情况,安装似乎成功:

$ 类型 rvm | 头-n1
rvm 是一个函数
$导轨-v
导轨 3.2.8
红宝石--版本
ruby 1.9.3p286(2012-10-12 修订版 37165)[x86_64-darwin12.2.0]

安装过程中的错误/警告包括:
警告:无法在 mxcl/master/vim 上点击 homebrew/dupes/vim
获取 ruby​​ 解释器时出错。停止安装。

创建了一个名为“agile”的新目录,更改为该目录并执行:
“轨道新演示”
在输出的第一行得到“`mkdir': Permission denied”

然后尝试“sudo rails new demo”
在输出的第一行得到“Could not find Rake”

(本文末尾提供了完整输出。)

尝试了各种方法来查看 rake、rails、ruby 或 rvm 是否有问题,但似乎一切都恢复正常了。

Michaels-MacBook-Pro:敏捷 mh$ rake --version
耙子,版本 0.9.2.2
Michaels-MacBook-Pro:敏捷 mh$ whereis rake
/usr/bin/rake
Michaels-MacBook-Pro:agile mh$ which rake
/Users/mh/.rvm/gems/ruby-1.9.3-p286@global/bin/rake
Michaels-MacBook-Pro:敏捷 mh$ 哪个 gem
/Users/mh/.rvm/rubies/ruby-1.9.3-p286/bin/gem
Michaels-MacBook-Pro:敏捷 mh$ rvm 信息

红宝石-1.9.3-p286:

  系统:
    uname: "Darwin Michaels-MacBook-Pro.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64"
    系统:“下载”
    bash: "/bin/bash => GNU bash,版本 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  转速:
    版本:“ rvm 1.16.17 () by Wayne E. Seguin,Michal Papis [https://rvm.io/]”
    更新:“7 小时 52 分 30 秒前”

  红宝石:
    翻译:“红宝石”
    版本:“1.9.3p286”
    日期:“2012-10-12”
    平台:“x86_64-darwin12.2.0”
    补丁级别:“2012-10-12 修订版 37165”
    full_version:“ruby 1.9.3p286(2012-10-12 修订版 37165)[x86_64-darwin12.2.0]”

  家园:
    宝石:“/Users/mh/.rvm/gems/ruby-1.9.3-p286”
    红宝石:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286”

  二进制文件:
    红宝石:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286/bin/ruby”
    irb:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286/bin/irb”
    宝石:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286/bin/gem”
    耙子:“/Users/mh/.rvm/gems/ruby-1.9.3-p286@global/bin/rake”

  环境:
    路径:“/Users/mh/.rvm/gems/ruby-1.9.3-p286/bin:/Users/mh/.rvm/gems/ruby-1.9.3-p286@global/bin:/Users/mh/ .rvm/rubies/ruby-1.9.3-p286/bin:/Users/mh/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt /X11/bin:/usr/local/git/bin"
    GEM_HOME:“/Users/mh/.rvm/gems/ruby-1.9.3-p286”
    GEM_PATH: "/Users/mh/.rvm/gems/ruby-1.9.3-p286:/Users/mh/.rvm/gems/ruby-1.9.3-p286@global"
    MY_RUBY_HOME:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286”
    IRBRC:“/Users/mh/.rvm/rubies/ruby-1.9.3-p286/.irbrc”
    红宝石:“”
    宝石:“”


Michaels-MacBook-Pro:敏捷 mh$ 类型 rvm | 头-n1
rvm 是一个函数




==================================================== ==================
Michaels-MacBook-Pro:agile mh$ rails new demo
      创造  
/Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': 权限被拒绝 - /Users/mh/agile/demo (Errno ::EACCES)
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:205:in `each'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:51:in `block in invoke!'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:50:in `invoke!'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:15:in `empty_directory'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/generators/app_base.rb:103:in `create_root'
    来自 (eval):1:in `create_root'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/commands/application.rb:38:in `'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/lib/rails/cli.rb:15:in `'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/gems/railties-3.2.8/bin/rails:7:in `'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/rails:19:in `load'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/rails:19:in `'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `'
Michaels-MacBook-Pro:agile mh$ sudo rails 新演示
/Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': 找不到 rake (>= 0.8. 7) 在 [actionmailer-3.2.8、actionpack-3.2.8、activemodel-3.2.8、activerecord-3.2.8、activeresource-3.2.8、activesupport-3.2.8、arel-3.0.2、builder-3.0 中。 4、erubis-2.7.0、hiking-1.2.1、i18n-0.6.1、journey-1.0.4、json-1.7.5、mail-2.4.4、mime-types-1.19、multi_json-1.3.6、 polyglot-0.3.3, rack-1.4.1, rack-cache-1.2, rack-ssl-1.3.2, rack-test-0.6.2, rails-3.2.8, railties-3.2.8, rdoc-3.12, sprockets-2.1.3、thor-0.16.0、tilt-1.3.3、treetop-1.4.12、tzinfo-0.3.34] (Gem::LoadError)
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:777:in `block in activate_dependencies'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `each'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `activate_dependencies'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:750:in `activate'
    来自 /Users/mh/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/rails:18:in `'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
    来自 /Users/mh/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `'
4

1 回答 1

1

使用这个资源,它会为你安装一切:Rails Installer

于 2012-10-31T05:16:15.820 回答