权限被拒绝@ rb_sysopen - /home/david/geofly/config/initializers/sorcery.rb(Errno :: EACCES)

时间:2018-03-24 03:35:10

标签: ruby-on-rails-4

我正在尝试为巫术安装omniauth。我跑的时候:

rails g sorcery:install external --migrations

gsub config / initializers / sorcery.rb Traceback(最近一次调用最后一次):     24:来自bin / rails:4:<main>' 23: from bin/rails:4:in需要&#39;     22:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in {{1} } run_command&#39!;     20:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:50:in {{ 1}} generate_or_destroy&#39;     18:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:123:in {{ 1}}需要&#39;     16:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in {{1} }阻止在需要&#39;     14:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in {{1} }&#39;     12:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-4.2.10/lib/rails/generators.rb:157:in {{1} }启动&#39;     10:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/group.rb:232:in {{1} } invoke_all&#39;      8:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in {{1} }各&#39;      6:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:133:in {{1} } invoke_command&#39;      4:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in {{1} } configure_initializer_file&#39;      2:来自/home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:265:in {{ 1}}开放&#39; /home/david/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/actions/file_manipulation.rb:265:in`initialize' :权限被拒绝@ rb_sysopen - /home/david/geofly/config/initializers/sorcery.rb(Errno :: EACCES)

1 个答案:

答案 0 :(得分:0)

我在db / migrate中回滚了所有迁移和删除的文件。 在wiki上使用魔法安装指南开始新鲜。 迁移时,我试图覆盖文件,导致(Errno :: EACCES),所以我只是手动删除这些文件。 我运行rake db:drop,rake:db:create rake db:migrate。 生产数据库无法删除,因此我使用mysql将其从termianl中删除。到目前为止,迁移工作正在进行,我成功迁移了SorceryExternal。