requirements:
install mailcatcher to catch mails on developement:
-
$ gem install mailcatcher
-
$ mailcatcher
-
go to localhost:1080 to view caught email in browser
$ heroku login ([email protected])
$ heroku create
$ heroku git push heroku master
$ heroku run rake db:create db:migrate #(had to run this for it to work?)
$ heroku login
$ git push heroku master
$ heroku open
Heroku destroy and recreate db:
heroku addons:destroy heroku-postgresql:hobby-dev heroku addons:create heroku-postgresql:hobby-dev
$ heroku local
DONT FORGET THE DOT!!!!!
if ruby/rails in slim doesnt work it could be because the surrounding htmls tags. e.g.
not working:
form.navbar-form = bootstrap_form_for(:user, :url => session_path(:user)) do |f| = f.email_field :email, :autofocus => true, :placeholder => 'Email address', hide_label: true = f.password_field :password, :placeholder => 'Password', hide_label: true = f.submit 'Log in', :class => 'btn btn-primary'
working:
= bootstrap_form_for(:user, :url => session_path(:user), html: { class: 'navbar-form' }) do |f| = f.email_field :email, :autofocus => true, :placeholder => 'Email address', hide_label: true = f.password_field :password, :placeholder => 'Password', hide_label: true = f.submit 'Log in', :class => 'btn btn-primary' OR .form.navbar-form = bootstrap_form_for(:user, :url => session_path(:user)) do |f| = f.email_field :email, :autofocus => true, :placeholder => 'Email address', hide_label: true = f.password_field :password, :placeholder => 'Password', hide_label: true = f.submit 'Log in', :class => 'btn btn-primary'