-
-
Save tobyhede/4417946 to your computer and use it in GitHub Desktop.
Revisions
-
peter revised this gist
Oct 5, 2012 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ rvm --rvmrc --create 1.9.3@myapp # 4. (Optional) Install gem dependencies and put binaries under ./bin # If you skip this step you need to prefix commandline commands with "bundle exec" # NOTE: I had to do the following on my mac for the gcc compiler to be found when the json gem was installed: # sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 bundle install --binstubs @@ -50,6 +50,9 @@ gem install bundler --pre # Needed to specify ruby 1.9.3 for Heroku # Add config.assets.initialize_on_precompile = false to config/application.rb # Avoid db connect on asset precompile RAILS_ENV=production bin/rake assets:precompile # (See https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar for more info) # NOTE: to get eventmachine (thin dependency) to install on my Mac (Mountain Lion) I had to do: # sudo ln -s /usr/bin/llvm-g++-4.2 /usr/bin/g++-4.2 # See: https://github.com/eventmachine/eventmachine/issues/325 bundle install echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile git add .; git commit -m "Preparations for Heroku deploy"; git push -
peter revised this gist
Oct 5, 2012 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,8 @@ rvm --rvmrc --create 1.9.3@myapp # 4. (Optional) Install gem dependencies and put binaries under ./bin # If you skip this step you need to prefix commandline commands with "bundle exec" # I had to do the following on my mac for the gcc compiler to be found when the json gem was installed: # sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 bundle install --binstubs # 5. Set up PostgreSQL database -
peter revised this gist
Oct 4, 2012 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it gem install bundler -
peter revised this gist
Oct 4, 2012 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it gem install bundler # 1. Get edge Rails source (master branch) git clone https://github.com/rails/rails.git @@ -50,4 +53,4 @@ git push heroku master heroku run rake db:migrate heroku restart heroku apps:open heroku logs --tail -
peter renamed this gist
Jun 30, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
peter revised this gist
Jun 30, 2012 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,8 @@ bin/rake db:create bin/rails generate scaffold Post title:string body:text bin/rake db:migrate bin/rails server # Add root to: 'posts#index' in config/routes.rb open http://localhost:3000 # 7. Create repo on github # Browse to http://github.com to click the "New repository" button @@ -38,14 +39,15 @@ git push -u origin master gem install bundler --pre # Needed to specify ruby 1.9.3 for Heroku # Add gem 'thin' to Gemfile # Typical web server for Heroku deploy # Add ruby '1.9.3' to Gemfile (after the source directive) # Add config.assets.initialize_on_precompile = false to config/application.rb # Avoid db connect on asset precompile RAILS_ENV=production bin/rake assets:precompile # (See https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar for more info) bundle install echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile git add .; git commit -m "Preparations for Heroku deploy"; git push heroku apps:create peter-myapp # myapp was taken... git push heroku master heroku run rake db:migrate heroku restart heroku apps:open heroku logs --tail -
peter revised this gist
Jun 30, 2012 . 1 changed file with 9 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -35,15 +35,17 @@ git remote add origin [email protected]:peter/myapp.git # use the URL from github h git push -u origin master # 8. Deploy to Heroku gem install bundler --pre # Needed to specify ruby 1.9.3 for Heroku # Add gem 'thin' to Gemfile # Typical web server for Heroku deploy # Add ruby '1.9.3' to Gemfile (after the source directive) bundle install echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile git add .; git commit -m "Added Procfile and ruby 1.9.3 and thin in Gemfile"; git push heroku apps:create peter-myapp # myapp was taken... git push heroku master heroku run rake db:migrate heroku restart heroku apps:open heroku logs --tail # https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar -
peter revised this gist
Jun 30, 2012 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,10 +6,10 @@ git clone https://github.com/rails/rails.git # 2. Create the rails app # The --edge option will point the Gemfile to rails on github (the tip of the master branch, i.e. EdgeRails) # Use the --dev option to insated point your Gemfile to your local rails checkout (useful for experimentation) rails/railties/bin/rails new myapp --edge --skip-bundle --database=postgresql --skip-test-unit --skip-index-html # 3. (Optional) Create rvm gemset on Ruby 1.9.3 (Rails 4 requires Ruby 1.9.3) # This step will isolate the gem dependencies of the app from other gems installed on your system rvm --rvmrc --create 1.9.3@myapp # 4. (Optional) Install gem dependencies and put binaries under ./bin @@ -23,11 +23,14 @@ bin/rake db:create # 6. Scaffold some model to test that the app works bin/rails generate scaffold Post title:string body:text bin/rake db:migrate bin/rails server open http://localhost:3000/posts # 7. Create repo on github # Browse to http://github.com to click the "New repository" button git init git add . git commit -m "First commit" git remote add origin [email protected]:peter/myapp.git # use the URL from github here git push -u origin master @@ -43,4 +46,4 @@ git push heroku master heroku run rake db:migrate heroku restart heroku apps:open heroku logs --tail -
peter created this gist
Jun 30, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL # 1. Get edge Rails source (master branch) git clone https://github.com/rails/rails.git # 2. Create the rails app # The --edge option will point the Gemfile to rails on github (the tip of the master branch, i.e. EdgeRails) # Use the --dev option to insated point your Gemfile to your local rails checkout (useful for experimentation) rails/railties/bin/rails new myapp --edge --database=postgresql --skip-test-unit --skip-index-html cd myapp # 3. (Optional) Create rvm gemset on Ruby 1.9.3 (Rails 4 requires Ruby 1.9.3) rvm --rvmrc --create 1.9.3@myapp # 4. (Optional) Install gem dependencies and put binaries under ./bin # If you skip this step you need to prefix commandline commands with "bundle exec" bundle install --binstubs # 5. Set up PostgreSQL database createuser myapp bin/rake db:create # 6. Scaffold some model to test that the app works bin/rails generate scaffold Post title:string body:text bin/rake db:migrate # 7. Create repo on github # Browse to http://github.com to click the "New repository" button git init git add . git remote add origin [email protected]:peter/myapp.git # use the URL from github here git push -u origin master # 8. Deploy to Heroku gem install bundler --pre # http://railsapps.github.com/rails-heroku-tutorial.html # Add gem 'thin' to Gemfile # Add ruby '1.9.3' to Gemfile echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile git add .; git commit -m "Added Procfile and ruby 1.9.3 in Gemfile"; git push heroku apps:create myapp # https://devcenter.heroku.com/articles/rails3x-asset-pipeline-cedar git push heroku master heroku run rake db:migrate heroku restart heroku apps:open heroku logs --tail