Skip to content

Instantly share code, notes, and snippets.

@kagemusha
Last active October 5, 2015 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagemusha/2732293 to your computer and use it in GitHub Desktop.
Save kagemusha/2732293 to your computer and use it in GitHub Desktop.
Create new Rails App with Rails App Composer
Install: gem install rails_apps_composer
Create app example:
rails_apps_composer new atm -r devise git haml heroku rails_admin rspec sass seed_database add_user home_page
List Recipes: rails_apps_composer list
Additional Steps
- gemfile
- If using pg: create db
- Default route
- Devise settings if need be
- add files
Add Files (specific to you)
- app/util files
- assets
- javascript dirs
- css dirs
- mobile
- add Mime::Type.register_alias "text/html", :mobile to initializers.mime_types.rb
- make sure app/util/mobile.rb added
- mobile layout: views/layouts/application.mobile.haml
- update app controller
include Mobile
before_filter :mobile
helper_method :mobile_device?, :current_user
- assets
- stylesheets/mobile.css
- stylesheets/mobile
Troubleshooting
1) if SSL cert error
a. set up certificate
http://stackoverflow.com/questions/4528101/ssl-connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificat
b. run (use approp ssl dir)
SSL_CERT_FILE=/opt/sm/pkg/versions/openssl/1.0.1c/ssl/certs/cert.pem rails new <your_app> -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb -T
2) devise/orm/false (LoadError)
generate devise user
/usr/local/rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- devise/orm/false (LoadError)
Solution: This happens when the the -O option set in the call to "rails new ". Leave it off.
Ref: https://github.com/RailsApps/rails_apps_composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment