Nice initiative with Rubidium, saving time is the way!
I wonder how the 'Templates' are compared to 'Generators' in Rails. In our company we have a ton of custom stuff (like overrides for Active Admin, model concerns etc) that we use for each end every project. So we've created a template Git repository with all of the project structure in place. And we clone this repo to start a new project. This template also has a Rails Generator that asks for a project name, replaces it in certain files, creates databases and runs db seeds. It feels like all that is done through the Generator can be done using Templates. So what's the real difference between them? :)
☒ Generators would be something that already exists within the project either through a generator in the lib/generators or from a gem added into the application. This is great for gems to provide installation assistance or for repeatable features. However, if you have to add new features/functionality to your application, the generators are not there for you to consume. This is where application templates can come into play where you add new functionality via an external source.
☒ When I created Rubidium, it was something that didn't exist in the community and I wanted to build a service which others would find useful. I think that competition is healthy and good for the community. People will find what works for them.
Just a heads up with the latest ruby and rails installed bundler threw errors but installed. So I investigated on removing or cleaning up the warning about registering. Was a rubygems issue, needed to run gem update --system 3.0.8 && gem update --system, once I did that it cleared up the error but created another issue.
When you got to the generate model if answered yes it would hang. Due to an issue with spring preloader, had to put in under your run 'bundle install', run 'spring stop'
So the file now looks like:
gem 'devise'
run 'bundle install' run 'spring stop'
if yes?("Do you want to generate a User Model (first_name, last_name, admin:boolean)?") generate(:model, 'user', 'first_name', 'last_name', 'admin:boolean') end
# rails g devise:install generate('devise:install') generate(:devise, 'User')
Thanks for the info ☒ . On Rubidium, I'll add this to the global template generator so that others can simple ignore having to add
run 'spring stop'
but i'll have to play around with it first as if spring isn't included in the project, it could case the script to "randomly" fail. I never saw this issue as I have a dot file in my home folder which omits spring and coffeescript.
I wonder how the 'Templates' are compared to 'Generators' in Rails. In our company we have a ton of custom stuff (like overrides for Active Admin, model concerns etc) that we use for each end every project. So we've created a template Git repository with all of the project structure in place. And we clone this repo to start a new project. This template also has a Rails Generator that asks for a project name, replaces it in certain files, creates databases and runs db seeds.
It feels like all that is done through the Generator can be done using Templates. So what's the real difference between them? :)
GoRails vs DriftingRuby?
So now we have 2 same initiatives: railsbytes and rubidium. Why compete?))
When you got to the generate model if answered yes it would hang. Due to an issue with spring preloader, had to put in under your run 'bundle install', run 'spring stop'
So the file now looks like:
gem 'devise'
run 'bundle install'
run 'spring stop'
if yes?("Do you want to generate a User Model (first_name, last_name, admin:boolean)?")
generate(:model, 'user', 'first_name', 'last_name', 'admin:boolean')
end
# rails g devise:install
generate('devise:install')
generate(:devise, 'User')
environment 'config.action_mailer.default_url_options = { host: "localhost", port: 3000 }', env: 'development'