0
我已經在運行rails服務器的本地機器上安裝了GraphicsMagick
和gem,並且運行良好。但是,在dev服務器上,使用Passenger
和Apache
設置環境。我已經安裝了GraphicsMagick
並做了一個bundle install
。它確實成功安裝了gem。在旅客上運行GraphicsMagick時出錯
然而,當我訪問該網站,我收到以下錯誤:
There was an error while trying to load the gem 'graphicsmagick'.
Gem Load Error is: Permission denied @ rb_sysopen - mkmf.log
Backtrace for gem load error is:
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:308:in `initialize'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:308:in `open'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:308:in `log_open'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:317:in `open'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
/home/ubuntu/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/mkmf.rb:1574:in `find_executable'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/graphicsmagick-1.0.5/lib/graphicsmagick.rb:8:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/home/ubuntu/AdvanceX/backend/config/application.rb:7:in `<top (required)>'
/home/ubuntu/AdvanceX/backend/config/environment.rb:2:in `require'
/home/ubuntu/AdvanceX/backend/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
Bundler Error Backtrace:
(Bundler::GemRequireError)
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/home/ubuntu/AdvanceX/backend/config/application.rb:7:in `<top (required)>'
/home/ubuntu/AdvanceX/backend/config/environment.rb:2:in `require'
/home/ubuntu/AdvanceX/backend/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
/home/ubuntu/.rvm/gems/ruby-2.3.3/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
任何想法,爲什麼發生這種情況?