Rails アプリである Refinery をインストールしようとすると、次のエラーが発生し続けます。
ESL@new-host-2 ~$ refinerycms /Application/MAMP/htdocs/goodwatching
create
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /Application (Errno::EACCES)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:51:in `block in invoke!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:50:in `invoke!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:15:in `empty_directory'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/generators/app_base.rb:103:in `create_root'
from (eval):1:in `create_root'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/refinerycms-2.0.10/bin/refinerycms:30:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/refinerycms:23:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/refinerycms:23:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
いくつかの同様の質問を見てきましたが、解決策は常に、ターゲットディレクトリが存在しないか、ルートによって所有されているようです。確認したところ、自分のディレクトリが存在し、自分が所有しており、権限は 755 です。
アップデート
多くのことを試したので、これが関連しているとは 100% 確信が持てませんが、rvm を更新したところrefinercyms goodwatching
、元の /goodwatching ディレクトリ内から実行できるようになりました。しかし、今、私はそれを実行するとこれを複数回取得しています:
NoMethodError: private method `open' called for Gem::Package:Class
An error occured while installing rake (10.0.4), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.4'` succeeds before bundling.
実行するgem install rake -v '10.0.4'
と成功しますが、直後に同じエラーが再び発生します。