I am trying to create a rvm wrapper for unicorn_rails, but it has to be on a per gemset basis due to multiple apps running on a server with different unicorn versions. After a few google searches, I've come to the conclusion that the only way to do this is to run gem install unicorn --version x
from the rvm gemset and then create the wrapper. Is there anyway to create a wrapper for a bundled gem? Or am I missing something?
我正在尝试为unicorn_rails创建一个rvm包装器,但由于在具有不同独角兽版本的服务器上运行多个应用程序,因此必须基于每个gemset。经过一些谷歌搜索,我得出结论,唯一的方法是从rvm gemset运行gem install unicorn --version x,然后创建包装器。无论如何都要为捆绑的宝石创建一个包装器?或者我错过了什么?
1 个解决方案
#1
1
Ok. I figured it out, but this solution seems a bit hacky.
好。我想通了,但这个解决方案看起来有点笨拙。
gem install unicorn
rvm wrapper ruby-version@gemset test unicorn_rails
vi `which test_unicorn_rails`
change the line exec unicorn_rails '$@'
to exec bundle exec unicorn_rails '$@'
更改行exec unicorn_rails'$ @'到exec bundle exec unicorn_rails'$ @'
gem uninstall unicorn
I just submitted a patch to rvm to allow for rvm wrapper ruby-version@gemset test "bundle exec unicorn_rails"
which creates test_bundle_exec_unicorn_rails
.
我刚刚向rvm提交了一个补丁,以允许rvm包装器ruby-version @ gemset测试“bundle exec unicorn_rails”,它创建了test_bundle_exec_unicorn_rails。
#1
1
Ok. I figured it out, but this solution seems a bit hacky.
好。我想通了,但这个解决方案看起来有点笨拙。
gem install unicorn
rvm wrapper ruby-version@gemset test unicorn_rails
vi `which test_unicorn_rails`
change the line exec unicorn_rails '$@'
to exec bundle exec unicorn_rails '$@'
更改行exec unicorn_rails'$ @'到exec bundle exec unicorn_rails'$ @'
gem uninstall unicorn
I just submitted a patch to rvm to allow for rvm wrapper ruby-version@gemset test "bundle exec unicorn_rails"
which creates test_bundle_exec_unicorn_rails
.
我刚刚向rvm提交了一个补丁,以允许rvm包装器ruby-version @ gemset测试“bundle exec unicorn_rails”,它创建了test_bundle_exec_unicorn_rails。