public
Last active

Rails! Featuring Bundler, Cucumber, RVM, Postgres, on Ruby-1.8.7

  • Download Gist
Gemfile-rails-2.3.8.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
# Everything you need to do to get started with Rails 2.3.8
#
# As of June 14th, 2010 @ 2:30 p.m. MST
#
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM
# - pg-0.9.0
# - Heroku support!
#
# 1. Install Ruby 1.8.7
# $ rvm install 1.8.7-p174
# $ rvm gemset create rails2
# $ rvm use 1.8.7-p174@rails2
#
# 2. Ensure no gems exist. Rake and rdoc are okay.
#
# Note: If you have no gems, you've run into an env bug.
# Open a new terminal, `rvm use 1.8.7-p174@rails2` and continue.
#
# $ gem list # rake, rdoc are okay.
#
# 3. Ensure rubygems-1.3.7
# $ gem -v
#
# 4. Install bundler 0.9.25
# $ gem install bundler -v=0.9.25
#
# 5. Install rails-2.3.8
# $ gem install rails
#
# 6. Setup a Rails app
# $ rails rails238
# $ cd rails238
#
# 7. Setup the Rails app with Bundler
# a. Follow the instructions at http://gembundler.com/rails23.html
# b. Replace the default Gemfile with this one
# c. Run:
# $ bundle install
# $ Update config/database.yml with the following:
#
# 8. Setup the database
# development:
# adapter: postgresql
# encoding: utf8
# database: rails238gist_development
# username: postgres
# password:
# host: localhost
#
# # Warning: The database defined as "test" will be erased and
# # re-generated from your development database when you run "rake".
# # Do not set this db to the same as development or production.
# test: &TEST
# adapter: postgresql
# encoding: utf8
# database: rails238gist_test
# username: postgres
# password:
# host: localhost
#
# 9. Setup RSpec and Cucumber!
# $ ./script/generate rspec
# $ ./script/generate cucumber --rspec --capybara
#
# 10. Generating a Cucumber feature
# $ ./script/generate cucumber:feature post title:string body:text published:boolean
# $ ./script/generate scaffold post title:string body:text published:boolean
#
# 11. Setup and test your new models
# $ rake db:create
# $ rake db:migrate
# $ rake spec # specs
# $ rake cucumber # features
#
# Note: *All* your tests should be passing
# rspec generates specs which cause errors
#
# 12. Pushing to heroku
# $ gem install heroku
# $ heroku create rails238gist --stack bamboo-ree-1.8.7
# $ git push heroku master
# $ heroku rake db:migrate
#
# 13. Visit rails238gist.heroku.com
 
 
source "http://rubygems.org"
 
gem "rails", "2.3.8"
gem "pg", "0.9.0"
gem "capistrano"
gem "heroku"
 
gem "rack", "1.1.0"
gem "clearance"
gem "fastercsv"
 
group :test do
gem "rspec", "1.3.0"
gem "rspec-rails", "1.3.2"
gem "faker"
gem "database_cleaner", :git => "git://github.com/bmabey/database_cleaner.git"
gem "capybara", :git => "git://github.com/jnicklas/capybara.git"
gem "cucumber"
gem "cucumber-rails"
gem "factory_girl"
gem "formtastic"
gem "email_spec"
end
Gemfile-rails-3.0.0.beta4.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
# Everything you need to do to get started with Rails 3
#
# As of June 15th, 2010 @ 4:40 p.m. MST
#
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec + Rspec-Rails 2.0.0.beta.12
# - RVM
# - pg-0.9.0
# - Heroku support!
#
# 1. Install Ruby 1.8.7
# $ rvm install 1.8.7-p174
# $ rvm gemset create rails3
# $ rvm use 1.8.7-p174@rails3
#
# 2. Ensure no gems exist. Rake and rdoc are okay.
#
# Note: If you have no gems, you've run into an env bug.
# Open a new terminal, `rvm use 1.8.7-p174@rails3` and continue.
#
# $ gem list # rake, rdoc are okay.
#
# 3. Ensure rubygems-1.3.7
# $ gem -v
#
# 4. Install bundler-0.9.26
# $ gem install bundler
#
# 5. Install rails3.0.0-beta4
# $ gem install rails --pre
#
# 6. Setup a Rails app
# $ rails new rails3gist
# $ cd rails3gist
#
# 7. Setup the Rails app with Bundler and this Gemfile
# a. Replace the default Gemfile with this one
# b. Run:
# $ bundle install
# $ Update config/database.yml with the following:
#
# 8. Setup the database
# development:
# adapter: postgresql
# encoding: utf8
# database: rails3gist_development
# username: postgres
# password:
# host: localhost
#
# # Warning: The database defined as "test" will be erased and
# # re-generated from your development database when you run "rake".
# # Do not set this db to the same as development or production.
# test: &TEST
# adapter: postgresql
# encoding: utf8
# database: rails3gist_test
# username: postgres
# password:
# host: localhost
#
# 9. Setup RSpec and Cucumber!
# $ ./script/rails g rspec:install
# $ ./script/rails g cucumber:install --rspec --capybara
#
# 10. Generating a Cucumber feature
# $ ./script/rails generate cucumber:feature post title:string body:text published:boolean
# $ ./script/rails generate scaffold post title:string body:text published:boolean
#
# 11. Setup and test your new models
# $ rake db:create
# $ rake db:migrate
# $ rake spec # specs
# $ rake cucumber # features
#
# Note: *All* your tests should be passing
# rspec generates specs which cause errors
#
# 12. Pushing to Heroku
# $ gem install heroku
# $ heroku create rails3gist --stack bamboo-ree-1.8.7
# $ git push heroku master
# $ heroku create db:migrate
#
# 13. Visit rails3gist.heroku.com
#
# TODO:
# Resolve "`utc_offset": undefined method `current_period"" error when running 1.9.2-preview1
 
source "http://rubygems.org"
 
gem "rails", "3.0.0.beta4"
gem "pg", "0.9.0"
gem "capistrano"
gem "heroku"
 
gem "rack", "1.1.0"
gem "clearance"
gem "fastercsv"
 
# gem 'unicorn'
 
group :test do
gem "rspec"
gem "rspec-rails", ">= 2.0.0.beta.12"
gem "faker"
gem "database_cleaner", :git => "git://github.com/bmabey/database_cleaner.git"
gem "capybara", :git => "git://github.com/jnicklas/capybara.git"
gem "cucumber"
# gem "cucumber", :git => "git://github.com/aslakhellesoy/cucumber.git"
gem "cucumber-rails", :git => "git://github.com/aslakhellesoy/cucumber-rails.git"
# gem 'ruby-debug'
gem "factory_girl", "1.3.0"
gem "factory_girl_rails", "1.0"
# TODO: test and evaluate
# gem "formtastic", :git => "git://github.com/justinfrench/formtastic.git", :branch => "rails3"
# gem "email_spec", :git => "git://github.com/bmabey/email-spec.git", :branch => "rails3"
end

Rack shouldn't need to be set in the Gemfile. Rails has it as a gemspec dependency so it will install automatically. Also, Rails specifically loads that version of Rack.

Found one problem:
./script/generate cucumber:feature

should just be:
./script/generate feature

Otherwise you run into:
Couldn't find 'cucumber:feature' generator

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.