Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Rails应用程序“;“拒绝许可”;安装refinerycms时出错_Ruby On Rails_Ruby_Rubygems_Refinerycms - Fatal编程技术网

Ruby on rails Rails应用程序“;“拒绝许可”;安装refinerycms时出错

Ruby on rails Rails应用程序“;“拒绝许可”;安装refinerycms时出错,ruby-on-rails,ruby,rubygems,refinerycms,Ruby On Rails,Ruby,Rubygems,Refinerycms,在尝试安装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)

在尝试安装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>'
当我运行
gem install rake-v'10.0.4'
时,它确实成功了,但之后我立即再次遇到相同的错误。

尝试使用sudo

sudo refinerycms /Application/MAMP/htdocs/goodwatching
更新

尝试删除Gemfile.lock

然后


我试过了,但没用。但我确实取得了一些进展(见上面的更新)。您是否尝试运行“mkdir/Application/MAMP/htdocs/goodwatching/test”?输出是什么?我看到了
/googlewatching/Gemfile
是吗?@Emerson不,是.lock。从应用程序根路径运行“ls-lh”,因为它不在那里。应该是吗?
sudo refinerycms /Application/MAMP/htdocs/goodwatching
sudo gem update --system
sudo gem install bundler
sudo bundle install