For my survivor pool app, I need users. I’ll use nifty-generators nifty:authentication to do it. First I type
rails g nifty:authentication --help
to figure out what’s what. It recommends that I install nifty:layout first, so I do.
rails g nifty:layout
It asked me if I wanted to overwrite application.html.erb and I said “Y”. Next I install authentication
rails g nifty:authentication
When I try to start the server, it complains that I don’t have the mocha gem. Oh yeah, I probably need to do some stuff first.
bundle install
rake db:migrate
Now I can start the server and navigate to http://localhost:3000/signup and it works a treat. Before I push these changes up to heroku, I want to make a landing page so it’s not the rails default one. For now, I delete public/index.html and put
root :to => "users#new"
in config/routes.rb. The landing page will be the signup page for now. Next, push it up to heroku
git push heroku master
heroku rake db:migrate
Ugh. Heroku uses postgres and my Rails app is in sqlite3. I’ll post how I fix it, but I’ll bet it won’t be pretty