This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin [email protected]:YourUsername/sample_app.git | |
git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku create | |
git push heroku master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdfasdfsadfasdfasdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "Your Name" | |
git config --global user.email "[email protected]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem install rails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails -v | |
This command should give you the version of rails which means that it was successfully installed. | |
If it says that rails is not installed then you will have to do some strange/extra work | |
open the file at ~/.bashrc in a text editor | |
and then type this (at the end of the file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class StoreControllerTest < ActionController::TestCase | |
test "should get index" do | |
get :index | |
assert_response :success | |
assert_select '#columns #side a', :minimum=> 4 | |
assert_select '#main .entry', 3 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test "image url" do | |
ok= %w{ fred.gif fred.png fred.png FRED.JPG FRED.Jpg | |
http://a.b.c/x/y/z/fred.gif} | |
bad=%w{ fred.gif/hello fred.gif.hello fred.doc } | |
ok.each do |name| | |
assert new_product(name).valid? "#{name} shouldn't be invalid" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tails -f log/development log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/carts/1" for 127.0.0.1 at Sun Jun 12 16:50:01 -0500 2011 | |
Processing by CartsController#show as HTML | |
Parameters: {"id"=>"1"} | |
Cart Load (0.5ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = 1 LIMIT 1 | |
LineItem Load (0.8ms) SELECT "line_items".* FROM "line_items" WHERE ("line_items".cart_id = 1) | |
Product Load (0.7ms) SELECT "products".* FROM "products" WHERE "products"."id" = 2 ORDER BY title LIMIT 1 | |
Product Load (0.7ms) SELECT "products".* FROM "products" WHERE "products"."id" = 3 ORDER BY title LIMIT 1 | |
Rendered carts/show.html.erb within layouts/application (129.5ms) | |
Completed 200 OK in 174ms (Views: 142.1ms | ActiveRecord: 6.4ms) |