rails new app_name -db mysql
Then uncomment the edge Rails line in the Gemfile:
gem 'rails', github: 'rails/rails'
and bundle update
- just bundle
ing will fail due to unmet dependencies.
Now, rails -v
should return something like Rails 5.0.0.beta2
.
Run
rake rails:update
This will prompt to overwrite each config file it finds that needs overwriting. I'm doing a clean install, so, yes to everything.
Now, supposedly HAML is default and ES6 is all taken care of, but I'm having issues. So to the Gemfile, add
gem 'babel-transpiler'
gem 'haml-rails'
And all is good it seems. Run rake haml:erb2haml
and dump the erb layout.
The haml-rails generator command seems to be currently busted for R5 v0v
Rename application.css
to application.sass
mkdir app/assets/config && touch app/assets/config/manifest.js
to add the new assets
manifest. Not sure of current status, whether it'll go to a YAML file once Sprockets settles,
but it's tested & works if going down that route. In the manifest, add something like:
// JS and CSS bundles
//= link application.js
//= link application.css
// Images so that views can link to them
//= link_tree ../images .svg
//= link_tree ../images .png
Good to go, really. rails s
and open localhost:3000 to check.