Skip to content

Instantly share code, notes, and snippets.

@ion1
Created March 1, 2010 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ion1/318731 to your computer and use it in GitHub Desktop.
Save ion1/318731 to your computer and use it in GitHub Desktop.
http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release
”The first line is required because RubyGems currently can’t mix prerelease
and regular release gems (someone please fix that!).”
Asennetaan tuon vuoksi Rails Bundlerilla:
% export PATH="$PATH:/var/lib/gems/1.8/bin"
% sudo gem install bundler --version=0.9.9
(0.9.10 vaatii uudemman RubyGemsin kuin Debianissa/Ubuntussa on.)
% cd your-project-directory
% vi Gemfile
# Temporary Gemfile just to get Rails 3 beta installed
source 'http://gemcutter.org'
gem "rails", "3.0.0.beta"
gem "bundler", "0.9.9" # Prevent the installation of 0.9.10
% bundle install
% bundle exec rails example.net --skip-testunit --skip-prototype
(Käytetään RSpeciä TestUnitin sijaan ja jQueryä Prototypen sijaan.)
(bundle exec... suorittaa rails-binäärin ~/.bundlen alta.)
% cd example.net
% cp config/database.yml{,.example}
% echo config/database.yml >>.gitignore
% git config user.name="Foo Bar"
% git config user.email="foo@example.net"
(Nämä ajetaan vain kerran.)
% git init
% git add .
% git commit -m 'Initial import'
% vi Gemfile
...
group :test do
gem "rspec", "2.0.0.a10"
gem "rspec-rails", "2.0.0.a10"
gem "webrat"
gem "cucumber"
gem "cucumber-rails"
end
% bundle install
% script/rails generate cucumber:skeleton
% git add .
% git commit -m 'Add cucumber skeleton'
% vi features/manage_projects.feature
@wip
Feature: Manage projects
In order to manage projects
As a user
I want to be able to add and remove projects
Scenario: Add a new project
Given ...
When ...
Then ...
...
% git add features
% git commit -m 'Add initial manage_projects feature'
% sudo gem install rake
% rake db:migrate RAILS_ENV=test
$ rake cucumber:wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment