Created
January 18, 2012 15:48
-
-
Save mikeymicrophone/1633639 to your computer and use it in GitHub Desktop.
the process of setting up, editing, and deploying the community_pics app
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
First, download GitHub for Mac (or install git). | |
http://mac.github.com | |
Then, go to the community_pics repository page and click "Clone in Mac" | |
http://github.com/schwabsauce/community_pics | |
Open a Terminal window and move into the community_pics directory | |
$ cd Documents/community_pics | |
Then run bundle and rake db:migrate. | |
$ bundle | |
$ rake db:migrate | |
Now you are ready to start a server | |
$ rails s | |
You can see the app running at this address. | |
http://localhost:3000 | |
The first thing you will have to do is click "sign up" and create a password. | |
The output of some of these commands is shown below. | |
Michaels-MacBook-Air:community_pics mikey$ bundle | |
Fetching source index for http://rubygems.org/ | |
Installing rake (0.9.2.2) | |
Installing multi_json (1.0.4) | |
Installing activesupport (3.1.3) | |
Using builder (3.0.0) | |
Using i18n (0.6.0) | |
Installing activemodel (3.1.3) | |
Using erubis (2.7.0) | |
Installing rack (1.3.6) | |
Using rack-cache (1.1) | |
Using rack-mount (0.8.3) | |
Using rack-test (0.6.1) | |
Using hike (1.2.1) | |
Using tilt (1.3.3) | |
Using sprockets (2.0.3) | |
Installing actionpack (3.1.3) | |
Using mime-types (1.17.2) | |
Using polyglot (0.3.3) | |
Using treetop (1.4.10) | |
Using mail (2.3.0) | |
Installing actionmailer (3.1.3) | |
Using arel (2.2.1) | |
Using tzinfo (0.3.31) | |
Installing activerecord (3.1.3) | |
Installing activeresource (3.1.3) | |
Using ansi (1.4.1) | |
Using bundler (1.0.21) | |
Installing carrierwave (0.5.8) | |
Installing coffee-script-source (1.2.0) | |
Installing execjs (1.2.13) | |
Using coffee-script (2.2.0) | |
Using rack-ssl (1.3.2) | |
Installing json (1.6.5) with native extensions | |
Installing rdoc (3.12) | |
Using thor (0.14.6) | |
Installing railties (3.1.3) | |
Using coffee-rails (3.1.1) | |
Installing jquery-rails (1.0.19) | |
Installing rails (3.1.3) | |
Installing sass (3.1.12) | |
Installing sass-rails (3.1.5) | |
Installing sqlite3 (1.3.5) with native extensions | |
Installing turn (0.8.2) | |
Installing uglifier (1.2.2) | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
Michaels-MacBook-Air:community_pics mikey$ rake db:migrate | |
== CreatePictures: migrating ================================================= | |
-- create_table(:pictures) | |
-> 0.0010s | |
== CreatePictures: migrated (0.0010s) ======================================== | |
== PictureHasPhotoFile: migrating ============================================ | |
-- add_column(:pictures, :photo_file, :string) | |
-> 0.0023s | |
== PictureHasPhotoFile: migrated (0.0023s) =================================== | |
Michaels-MacBook-Air:community_pics mikey$ rails g scaffold tag name:string | |
invoke active_record | |
create db/migrate/20120118150034_create_tags.rb | |
create app/models/tag.rb | |
invoke test_unit | |
create test/unit/tag_test.rb | |
create test/fixtures/tags.yml | |
route resources :tags | |
invoke scaffold_controller | |
create app/controllers/tags_controller.rb | |
invoke erb | |
create app/views/tags | |
create app/views/tags/index.html.erb | |
create app/views/tags/edit.html.erb | |
create app/views/tags/show.html.erb | |
create app/views/tags/new.html.erb | |
create app/views/tags/_form.html.erb | |
invoke test_unit | |
create test/functional/tags_controller_test.rb | |
invoke helper | |
create app/helpers/tags_helper.rb | |
invoke test_unit | |
create test/unit/helpers/tags_helper_test.rb | |
invoke assets | |
invoke coffee | |
create app/assets/javascripts/tags.js.coffee | |
invoke scss | |
create app/assets/stylesheets/tags.css.scss | |
invoke scss | |
identical app/assets/stylesheets/scaffolds.css.scss | |
Michaels-MacBook-Air:community_pics mikey$ rake db:migrate | |
== CreateTags: migrating ===================================================== | |
-- create_table(:tags) | |
-> 0.0013s | |
== CreateTags: migrated (0.0014s) ============================================ | |
Michaels-MacBook-Air:community_pics mikey$ rails g scaffold tagging tag:belongs_to picture:belongs_to | |
invoke active_record | |
create db/migrate/20120118150329_create_taggings.rb | |
create app/models/tagging.rb | |
invoke test_unit | |
create test/unit/tagging_test.rb | |
create test/fixtures/taggings.yml | |
route resources :taggings | |
invoke scaffold_controller | |
create app/controllers/taggings_controller.rb | |
invoke erb | |
create app/views/taggings | |
create app/views/taggings/index.html.erb | |
create app/views/taggings/edit.html.erb | |
create app/views/taggings/show.html.erb | |
create app/views/taggings/new.html.erb | |
create app/views/taggings/_form.html.erb | |
invoke test_unit | |
create test/functional/taggings_controller_test.rb | |
invoke helper | |
create app/helpers/taggings_helper.rb | |
invoke test_unit | |
create test/unit/helpers/taggings_helper_test.rb | |
invoke assets | |
invoke coffee | |
create app/assets/javascripts/taggings.js.coffee | |
invoke scss | |
create app/assets/stylesheets/taggings.css.scss | |
invoke scss | |
identical app/assets/stylesheets/scaffolds.css.scss | |
Michaels-MacBook-Air:community_pics mikey$ rake db:migrate | |
== CreateTaggings: migrating ================================================= | |
-- create_table(:taggings) | |
-> 0.0010s | |
-- add_index(:taggings, :tag_id) | |
-> 0.0004s | |
-- add_index(:taggings, :picture_id) | |
-> 0.0005s | |
== CreateTaggings: migrated (0.0020s) ======================================== | |
Michaels-MacBook-Air:community_pics mikey$ heroku create --stack cedar | |
Creating floating-flower-6896... done, stack is cedar | |
http://floating-flower-6896.herokuapp.com/ | [email protected]:floating-flower-6896.git | |
Git remote heroku added | |
Michaels-MacBook-Air:community_pics mikey$ git push heroku master | |
Counting objects: 223, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (202/202), done. | |
Writing objects: 100% (223/223), 58.46 KiB, done. | |
Total 223 (delta 80), reused 79 (delta 3) | |
-----> Heroku receiving push | |
-----> Ruby/Rails app detected | |
-----> Installing dependencies using Bundler version 1.1.rc.7 | |
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment | |
Fetching gem metadata from http://rubygems.org/....... | |
Installing rake (0.9.2.2) | |
Installing multi_json (1.0.4) | |
Installing activesupport (3.1.3) | |
Installing builder (3.0.0) | |
Installing i18n (0.6.0) | |
Installing activemodel (3.1.3) | |
Installing erubis (2.7.0) | |
Installing rack (1.3.6) | |
Installing rack-cache (1.1) | |
Installing rack-mount (0.8.3) | |
Installing rack-test (0.6.1) | |
Installing hike (1.2.1) | |
Installing tilt (1.3.3) | |
Installing sprockets (2.0.3) | |
Installing actionpack (3.1.3) | |
Installing mime-types (1.17.2) | |
Installing polyglot (0.3.3) | |
Installing treetop (1.4.10) | |
Installing mail (2.3.0) | |
Installing actionmailer (3.1.3) | |
Installing arel (2.2.1) | |
Installing tzinfo (0.3.31) | |
Installing activerecord (3.1.3) | |
Installing activeresource (3.1.3) | |
Installing carrierwave (0.5.8) | |
Installing coffee-script-source (1.2.0) | |
Installing execjs (1.2.13) | |
Installing coffee-script (2.2.0) | |
Installing rack-ssl (1.3.2) | |
Installing json (1.6.5) with native extensions | |
Installing rdoc (3.12) | |
Installing thor (0.14.6) | |
Installing railties (3.1.3) | |
Installing coffee-rails (3.1.1) | |
Installing jquery-rails (1.0.19) | |
Installing pg (0.11.0) with native extensions | |
Using bundler (1.1.rc.7) | |
Installing rails (3.1.3) | |
Installing sass (3.1.12) | |
Installing sass-rails (3.1.5) | |
Installing uglifier (1.2.2) | |
Your bundle is complete! It was installed into ./vendor/bundle | |
Cleaning up the bundler cache. | |
-----> Writing config/database.yml to read from DATABASE_URL | |
-----> Preparing app for Rails asset pipeline | |
Running: rake assets:precompile | |
/usr/local/bin/ruby /tmp/build_242tk1uy0yuif/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets | |
-----> Rails plugin injection | |
Injecting rails_log_stdout | |
Injecting rails3_serve_static_assets | |
-----> Discovering process types | |
Procfile declares types -> (none) | |
Default types for Ruby/Rails -> console, rake, web, worker | |
-----> Compiled slug size is 17.9MB | |
-----> Launching... done, v5 | |
http://floating-flower-6896.herokuapp.com deployed to Heroku | |
To [email protected]:floating-flower-6896.git | |
* [new branch] master -> master | |
Michaels-MacBook-Air:community_pics mikey$ heroku run rake db:migrate | |
Running rake db:migrate attached to terminal... up, run.1 | |
Migrating to CreatePictures (20120115185030) | |
== CreatePictures: migrating ================================================= | |
-- create_table(:pictures) | |
-> 0.0185s | |
== CreatePictures: migrated (0.0187s) ======================================== | |
Migrating to PictureHasPhotoFile (20120115192726) | |
== PictureHasPhotoFile: migrating ============================================ | |
-- add_column(:pictures, :photo_file, :string) | |
-> 0.0064s | |
== PictureHasPhotoFile: migrated (0.0065s) =================================== | |
Migrating to CreateTags (20120118150034) | |
== CreateTags: migrating ===================================================== | |
-- create_table(:tags) | |
-> 0.0103s | |
== CreateTags: migrated (0.0114s) ============================================ | |
Migrating to CreateTaggings (20120118150329) | |
== CreateTaggings: migrating ================================================= | |
-- create_table(:taggings) | |
-> 0.0054s | |
-- add_index(:taggings, :tag_id) | |
-> 0.0067s | |
-- add_index(:taggings, :picture_id) | |
-> 0.0100s | |
== CreateTaggings: migrated (0.0223s) ======================================== | |
Michaels-MacBook-Air:community_pics mikey$ |
In this second version, I edited out the unnecessary commands and mistakes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deploying to heroku is pretty easy. The instructions I followed are available here:
http://devcenter.heroku.com/articles/rails3