对 Rails 来说是全新的。昨天我花了几个小时把头撞在砖墙上,试图在我的 Mac 上正确安装所有东西。最后,我认为我已经成功了,所以我开始尝试完成本教程: http: //net.tutsplus.com/tutorials/ruby/the-intro-to-rails-screencast-i-wish-i -有/
一切顺利,直到大约 4 分钟,当我在命令行输入给定指令并收到此错误消息时。
> rails g
/Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:199: warning: Insecure world writable dir /Library/Ruby/Gems/1.8 in PATH, mode 040777
gem install minitest
/Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9:in `require': no such file to load -- minitest/unit (LoadError)
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn.rb:13:in `require'
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn.rb:13
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
from /Applications/MAMP/htdocs/railstest/tasks/config/application.rb:13
from /Library/Ruby/Gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:24:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.8/lib/rails/commands.rb:24
from script/rails:6:in `require'
from script/rails:6
我在这里看到了一些其他类似问题的帖子,这表明这与文件权限有关。即使在摆弄权限之后,我仍然无法让它工作。权限是:
/Library: rwxr-xr-x
/Library/Ruby: rwxr-xr-x
/Library/Ruby/Gems: rwxr-xr-x
/Library/Ruby/Gems/1.8: rwxrwxrwx
尝试在 Gems/1.8 上 chmod 给我一条错误消息:“无法更改 /Library/Ruby/Gems/1.8 上的文件模式:不允许操作”
那么我需要做什么呢?
我正在运行 Mac OS 10.7.5,并且我有 XCode 4.5.1,还安装了命令行工具,如果有的话。