Friday 15 August 2014

ruby - How to create Rails project programmatically? -



ruby - How to create Rails project programmatically? -

i'm using rails 4.0.0.

i aware of commands rails new ... used create rails project via terminal. there methods programmatically?

i want avoid having code invoke pop-up terminal not users may have linux.

possible solution

programmatially re-create existing base of operations rails project. write new directory.

you can utilize same generator command rails new uses, example:

require 'rails/generators/rails/app/app_generator' rails::generators::appgenerator.start ['bar', '--skip-bundle'] # output: # create # create readme.rdoc # create rakefile # create config.ru # create .gitignore # ...

ruby-on-rails ruby ruby-on-rails-4 programmatically-created

No comments:

Post a Comment