This is a starter app for my Rails projects that has all of the usual user setup stuff in place. You can follow these instructions to get everything set up, and then you can just modify this readme for your own apps.
Getting the application set up on your development machine involves a few steps, but it's worth the effort.
Not much to do here
cp config/database.sqlite.example config/database.yml
Your database will be created when you run your migrations
Set up MySQL and set up root user with no password on your dev machine. Turn off MySQL when not using. This enables Rails to create databases automatically. If you choose to set up your database any other way, you are on your own for creating the databases listed in the example yml file.
cp config/database.example config/database.yml
Gems are managed via the dependencies in config/environment.rb
sudo rake gems:install sudo rake RAILS_ENV="test" gems:install sudo rake RAILS_ENV="cucumber" gems:install
Copy the email configuration template:
cp config/email.example config/email.yml
Open config/email.yml and change
to your full base URL for production.
to the site admin's email. This is where things like “contact us for support” forms should go
rake db:create:all rake db:bootstrap
Run the tests
rake spec cucumber features
If you have Selenium installed, you can tag specific Cucumber features to run by tagging them with
Install selenium-client gem
sudo gem install selenium-client mongrel
And then run the stories that require Selenium.
cucumber -p selenium features
Right now the bootstrap task creates the “user” role and the “admin” role, prompts you for admin user info, creates the user, and then adds the “admin” role to the user. Modify for your own uses.
* Cuke upgrades to latest, added in code for admin management of users
* Updated for newest cucumber and rspec
* Updated to work with Rails 2.3.5
* Fixed selenium bug
* Added Selenium support
2009-10-01 Updated to Rails 2.3.4