本文介绍了在Heroku上安装rmagick gem时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图将Rails应用程序推送到Heroku,但它试图构建rmagick gem(在Gemfile中指定)时失败。我已经在本地完成了 bundle install
,并且该应用运行良好。
但是,在Heroku中预先接收在构建rmagick示例后,我得到:
$ p $ make $ install
$ b / usr / ruby1 .8.7 / bin / ruby setup.rb安装
rm -f InstalledFiles
---> lib
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib
install RMagick.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle /gems/ruby/1.8/gems/rmagick-1.15.17/lib/
---> lib / rvg
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install embellishable.rb / disk1 / tmp / build_3eu8mw7r34j0f / .bundle / gems / ruby / 1.8 / gems / rmagick-1.15.17 / lib / rvg
install pathdata.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick- 1.15.17 / lib / rvg
安装stylable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install describeable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install deep_equal.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8 /gems/rmagick-1.15.17/lib/rvg
install misc.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install text.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install rvg.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/ gems / ruby / 1.8 / gems / rmagick-1.15.17 / lib / rvg
安装container.rb / disk1 / tmp / build_ 3eu8mw7r34j0f / .bundle / gems / ruby / 1.8 / gems / rmagick-1.15.17 / lib / rvg
install stretchable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick- 1.15.17 / lib / rvg
install paint.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install clippath.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install units.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8 /gems/rmagick-1.15.17/lib/rvg
安装transformable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
< --- lib / rvg
< --- lib
---> ext
---> ext / RMagick
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib
安装RMagick.so / disk1 / tmp / build_3eu8mw7r34j0f / .bundle /宝石/红宝石/ 1.8 /宝石/ rmagick - 17年1月15日/ lib中/。
post-install.rb:安装文档...
mkdir /usr/ruby1.8.7/share / RMagick
hook /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/./post-install.rb失败:
权限被拒绝 - / usr / ruby1.8.7 / share / RMagick
尝试'ruby setup.rb --help'获取详细的用法。
make:*** [install]错误1
然后它退出推送。我正在使用bamboo-ree-1.8.7堆栈。我是否需要额外添加一些东西才能使其工作?或者,它似乎只是一个文档问题。我不需要关于Heroku的文档,那么我可以禁用它吗?
预先感谢您。 解决方案
您的Gemfile条目应该是:
pre $ ge $ rmagick $ require => ; 'RMagick'
I'm trying to push a Rails app to Heroku, but it's failing when it tries to build the rmagick gem (which is specified in the Gemfile). I've done bundle install
locally and the app runs fine.
But, on Heroku in the pre-receive hook, after it build the rmagick examples, I get:
make install
/usr/ruby1.8.7/bin/ruby setup.rb install
rm -f InstalledFiles
---> lib
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib
install RMagick.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/
---> lib/rvg
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install embellishable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install pathdata.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install stylable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install describable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install deep_equal.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install misc.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install text.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install rvg.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install container.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install stretchable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install paint.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install clippath.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install units.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
install transformable.rb /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/rvg
<--- lib/rvg
<--- lib
---> ext
---> ext/RMagick
mkdir -p /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib
install RMagick.so /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/lib/.
<--- ext/RMagick
<--- ext
post-install.rb: installing documentation...
mkdir /usr/ruby1.8.7/share/RMagick
hook /disk1/tmp/build_3eu8mw7r34j0f/.bundle/gems/ruby/1.8/gems/rmagick-1.15.17/./post-install.rb failed:
Permission denied - /usr/ruby1.8.7/share/RMagick
Try 'ruby setup.rb --help' for detailed usage.
make: *** [install] Error 1
Then it bails out of the push. I'm using the bamboo-ree-1.8.7 stack. Do I need to add something extra to get it to work? Alternatively, it seems that it's only a documentation problem. I don't need the documentation on Heroku, so can I disable that instead?
Thanks in advance.
解决方案
You Gemfile entry should be:
gem "rmagick", :require => 'RMagick'
这篇关于在Heroku上安装rmagick gem时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!