You can simply do the following
sudo gem install cucumber cucumber-rails rspec rspec-rails webrat database_cleaner factory_girl faker
./script/generate rspec
./script/generate cucumber --rspec --webrat
It will setup your config/environments/cucumber.rb
You can add the missing ones manually like I did below
config.gem 'database_cleaner', :lib => false, :version => '>=0.4.3' unless File.directory?(File.join(Rails.root, 'vendor/plugins/database_cleaner'))
config.gem 'webrat', :lib => false, :version => '>=0.6.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/webrat'))
config.gem 'rspec-rails', :lib => 'spec/rails', :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
config.gem 'rspec', :lib => 'spec', :version => '>=1.3.0' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
config.gem 'cucumber'
config.gem 'cucumber-rails', :lib => 'cucumber/rails', :version => '>=0.2.4' unless File.directory?(File.join(Rails.root, 'vendor/plugins/cucumber-rails'))
config.gem "faker"
config.gem "factory_girl"