Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default version of gem in defaults file #343

Open
sonxurxo opened this issue Oct 6, 2015 · 2 comments
Open

Set default version of gem in defaults file #343

sonxurxo opened this issue Oct 6, 2015 · 2 comments

Comments

@sonxurxo
Copy link

sonxurxo commented Oct 6, 2015

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?

@vfonic
Copy link
Contributor

vfonic commented Oct 25, 2015

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

@DanielKehoe
Copy link
Member

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:
e3e0872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants