我有以下設置:安裝中的其他導軌申請創業板的包
一個通過這個應用程序開發者軌4.0.0應用=>我的主應用
可以創建寶石骷髏
現在I' d喜歡創建gem骨架源代碼並通過rails master應用程序中的調用運行gem Gemfile的bundle安裝:
class MyClass
# this works
def create_gem_skeleton
path = "path-to-gem-skeleton-outside-the-rails-master-app"
FileUtils.mkdir_p(path)
`cd #{path} && bundle gem my-new-gem`
end
# this method gets called, after I created the gem skeleton and manipulated it a bit with my preferences
def my_method
path = "path-to-gem-skeleton-outside-the-rails-master-app"
exec `cd #{path} && bundle install` # does not work, installs always the rails master bundle inside my rails master application, never touches the new gem-skeleton
system `cd #{path} && bundle install` # =||= .. same here
`cd #{path} && bundle install` # =||= .. same here
end
end
Any身體一個想法如何我可以在我的rails master應用程序中運行這樣的「bundle install」調用,將bundle安裝在新的gem-skeleton中,而不是觸摸rails套件?
我使用rails 4.0.0和ruby 2.0.0-p195
謝謝!
墊
似乎工作完美!非常感謝!我已經閱讀了bundle-exec手冊頁,但還不夠完美:)。 – Mattherick
我正在調試並正在處理該問題%&! 4個小時,這拯救了我的生活!謝謝! –