如何修复混乱的rbenv安装?

时间:2014-02-13 04:24:00

标签: ruby-on-rails ruby macos rvm rbenv

我还是开发新手,并没有意识到在安装rvm时我不应该安装rbenv。我按照git说明安装了rbenv,现在rails根本不起作用......我遇到了各种奇怪的错误,并试图修复它无济于事。我已经尝试删除rvm和rbenv,然后重新安装rbenv,但这似乎没有任何帮助。这是我最新的错误:

Ryans-MacBook-Pro:raffler Ryan$ bin/rails s
=> Booting WEBrick
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Rails Error: Unable to access log file. Please ensure that /Users/Ryan/code/raffler/log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
Exiting
/Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:332:in `initialize': Permission denied - /Users/Ryan/code/raffler/tmp/pids/server.pid (Errno::EACCES)
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:332:in `open'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:332:in `write_pid'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:254:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:84:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Ryans-MacBook-Pro:raffler Ryan$ 

如何解决我自己陷入困境的任何建议都会令人惊叹!谢谢!

1 个答案:

答案 0 :(得分:0)

通过错误消息的外观,您实际上有权限问题而不是rails问题。尝试执行chmod -R 666 /Users/Ryan/code/raffler/并确保您的用户是该目录的所有者。

相关问题