rails_apps_composer icon indicating copy to clipboard operation
rails_apps_composer copied to clipboard

Set default version of gem in defaults file

Open sonxurxo opened this issue 9 years ago • 2 comments

How can I specify the default version of a gem in the defaults file?

It seems that i reads gems as individual strings, so I can't see the way to set something like

gems:
- mysql2, '~> 0.3.18'

Currently I have an issue with Rails 4.1.2 and mysql2 0.4.1, and I like to switch back to a previous version of mysql2 gem with no luck. The same happens when trying to specify a github source for a gem.

Is there a way to achieve this, or should I first create a template and modify it?

sonxurxo avatar Oct 06 '15 15:10 sonxurxo

You could create a recipe instead of a gem. It's a bit of an overhead, but hey, no additional template editing. :)

https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/admin.rb#L12

https://github.com/RailsApps/rails_apps_composer/wiki/tutorial-rails-apps-composer#anatomy-of-a-recipe

vfonic avatar Oct 25 '15 09:10 vfonic

Yes this would be a nice enhancement. I'll keep it in mind but it's not a top priority.

In the meantime, I've corrected the problem with the mysql gem: https://github.com/RailsApps/rails_apps_composer/commit/e3e0872a05baf6cfa5250d9e2d52d0c1b7355763

DanielKehoe avatar Oct 26 '15 08:10 DanielKehoe