Web应用程序无法启动redmine3.4

时间:2017-10-14 11:25:00

标签: ruby-on-rails ruby ruby-on-rails-3 redmine

我得到了不同的错误 无法启动Web应用程序

Web application could not be started
There was an error while trying to write to Gemfile.lock. It is likely that

you need to allow write permissions for the file at path:
/usr/share/redmine/Gemfile.lock (Bundler::InstallError)
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:235:in rescue in lock' /usr/lib/ruby/vendor_ruby/bundler/definition.rb:220:inlock’
/usr/lib/ruby/vendor_ruby/bundler/environment.rb:34:in lock' /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:43:insetup’
/usr/lib/ruby/vendor_ruby/bundler.rb:120:in setup' /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in<top (required)>’
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:245:in block in run_load_path_setup_code' /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:348:inrunning_bundler’
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:243:in run_load_path_setup_code' /usr/share/passenger/helper-scripts/rack-preloader.rb:100:inpreload_app’
/usr/share/passenger/helper-scripts/rack-preloader.rb:158:in <module:App>' /usr/share/passenger/helper-scripts/rack-preloader.rb:29:inmodule:PhusionPassenger’
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `’

2 个答案:

答案 0 :(得分:0)

在启动Redmine之前,您需要安装必要的gem。为此,请导航到Gemfile所在的目录并运行bundle install。在您的情况下,这是:

cd /usr/share/redmine
bundle install

请务必以具有写入权限的用户身份运行此目录。如果这只是root,则可以在该目录中运行sudo bundle install

每次更改Gemfile时都必须重复此操作,通常是在每次新代码部署之后。

答案 1 :(得分:-1)

您的问题的解决方案可以在以下链接中找到

Gemfile.lock write error, permissions?

在您的终端中执行

   $whoami

上面命令的输出必须用来给文件夹和文件写入权限。在你的终端上做

  cd /usr/shared

  sudo chown -R $(whoami):$(whoami) redmine/

如果不是用户名问题,请尝试以下

    sudo  chmod  -R 777  redmine/