开发者

How to add a gem dependency and bundle install

开发者 https://www.devze.com 2023-03-01 07:27 出处:网络
Is it possible to add a gem dependency to a Rails 3 app programmatically through ruby code? EDIT I\'m trying to achieve that when I launch a rake task or a ruby script my rails app becomes a sass ra

Is it possible to add a gem dependency to a Rails 3 app programmatically through ruby code?

EDIT

I'm trying to achieve that when I launch a rake task or a ruby script my rails app becomes a sass rails app.

I have a bunch of file that needs to be copied and after that I'd like to add:开发者_运维技巧

gem 'sass'

to my Gemfile and run bundle install automatically.


Today's railscasts features Guard!

One of the guard extensions is guard-bundler which has this code that can achieve what I need.

https://github.com/guard/guard-bundler/blob/master/lib/guard/bundler.rb

I thought that there was a way to perform similar tasks with the Bundler class.

0

精彩评论

暂无评论...
验证码 换一张
取 消