开源项目 Redmine 系统,以前运行正常,这次重新分配空间扣,启动出现问题。

dengchaoyong · 2017年09月01日 · 最后由 jasl 回复于 2017年09月18日 · 7123 次阅读

之前一切正常,但是 home 目录空间特大,root 目录仅剩 11G 了,认为是 redmine 使用造成的。所以把 home 的多余空间分配给了 root 目录; 分配成功后,进行启动 redmine,出现以下错误信息。不知道这个是什么问题?

Exiting
/usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- core/rmagick (LoadError)
    from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:312:in `depend_on'
    from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:225:in `require_dependency'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:443:in `each'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:443:in `block in eager_load!'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:441:in `each'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:441:in `eager_load!'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /usr/local/redmine/config/environment.rb:14:in `<top (required)>'
    from /usr/local/redmine/config.ru:3:in `require'
    from /usr/local/redmine/config.ru:3:in `block in <main>'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
    from /usr/local/redmine/config.ru:in `new'
    from /usr/local/redmine/config.ru:in `<main>'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands/server.rb:46:in `app'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
    from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands/server.rb:70:in `start'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands.rb:50:in `tap'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

重新执行下 bundle

除了数据库相关的部分,其他的按照重新安装的步骤走一遍试试

缺少 ImageMagick 和 rmagick 这个 gem 吧

用来处理图片的

https://github.com/rmagick/rmagick

jasl 回复

怎么执行? 在 redmine 目录下,执行 Bundle install 吗?现在执行不了,报错。

dengchaoyong 回复

报啥错你倒贴出来啊。。。

badboy 回复

imagemagick 依赖包,我通过 rpm -qa | grep ImageMagick 可以查询到安装的软件 ImageMagick-6.7.2.7-6.el6.x86_64 ImageMagick-devel-6.7.2.7-6.el6.x86_64

通过 rpm -qa | grep rmagick 无任何信息

通过 gem install rmagick,报错

[root@centos /]# irb -rubygems -r Rmagick #1 /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in `require':LoadError: cannot load such file -- Rmagick

jasl 回复

刚才操作没报错了,但是启动还是同样的问题。

[root@centos redmine]# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Using rake 10.3.2
Using i18n 0.6.9
Using multi_json 1.10.1
Using activesupport 3.2.16
Using builder 3.0.0
Using activemodel 3.2.16
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.2
Using actionpack 3.2.16
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.16
Using arel 3.0.3
Using tzinfo 0.3.39
Using activerecord 3.2.16
Using activeresource 3.2.16
Using mini_portile 0.6.0
Using nokogiri 1.6.2.1
Using xpath 2.0.0
Using capybara 2.1.0
Using ffi 1.9.3
Using childprocess 0.5.3
Using coderay 1.1.0
Using database_cleaner 1.3.0
Using rack-ssl 1.3.4
Using json 1.8.1
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.16
Using jquery-rails 2.0.3
Using metaclass 0.0.4
Using mocha 1.1.0
Using mysql2 0.3.16
Using net-ldap 0.3.1
Using psych 2.0.5
Using ruby-openid 2.3.0
Using rack-openid 1.4.2
Using bundler 1.6.3
Using rails 3.2.16
Using rmagick 2.13.2
Using rubyzip 1.1.4
Using websocket 1.0.7
Using selenium-webdriver 2.42.0
Using shoulda-context 1.0.2
Using shoulda-matchers 1.4.1
Using shoulda 3.3.2
Using yard 0.8.7.4
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
[root@centos redmine]# ruby script/rails server -e production
=> Booting WEBrick
=> Rails 3.2.16 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- core/rmagick (LoadError)
    from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:312:in `depend_on'
    from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/dependencies.rb:225:in `require_dependency'
    from /usr/local/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/engine.rb:444:in `block (2 levels) in eager_load!'
……
dengchaoyong 回复

bundle exec rails s -e production

需要 登录 后方可回复, 如果你还没有账号请 注册新账号