Last active
December 17, 2015 01:39
-
-
Save omarowns/5530271 to your computer and use it in GitHub Desktop.
A collection of very very very basic file configurations for my ruby projects. LVL: n00b
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
| # Ignore bundler config | |
| /.bundle | |
| # Ignore the default SQLite database. | |
| /db/*.sqlite3 | |
| # Ignore all logfiles and tempfiles. | |
| /log/*.log | |
| /tmp | |
| # Ignore other unneeded files. | |
| doc/ | |
| *.swp | |
| *~ | |
| .project | |
| .DS_Store | |
| .idea |
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
| source 'https://rubygems.org' | |
| ruby '2.0.0' | |
| #ruby-gemset=railstutorial_rails_4_0 | |
| gem 'rails', '4.0.4' | |
| group :development, :test do | |
| gem 'sqlite3', '1.3.8' | |
| gem 'rspec-rails', '2.13.1' | |
| end | |
| group :test do | |
| gem 'selenium-webdriver', '2.35.1' | |
| gem 'capybara', '2.1.0' | |
| end | |
| gem 'sass-rails', '4.0.1' | |
| gem 'uglifier', '2.1.1' | |
| gem 'coffee-rails', '4.0.1' | |
| gem 'jquery-rails', '3.0.4' | |
| gem 'turbolinks', '1.1.1' | |
| gem 'jbuilder', '1.0.2' | |
| group :doc do | |
| gem 'sdoc', '0.3.20', require: false | |
| end | |
| group :production do | |
| gem 'pg', '0.15.1' | |
| gem 'rails_12factor', '0.0.2' | |
| 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
| == INITIALIZATION == | |
| $ rails new [project_name] | |
| $ cd [project_name] | |
| $ rvm gemset create [project_namegemset] | |
| $ tm .rvmrc | |
| # Add: | |
| # rvm use [ruby-]2.0.0 (or whatever version you are using) | |
| # rvm gemset use [project_namegemset] | |
| Edit Gemfile | |
| $ bundle update | |
| $ bundle install --without production | |
| Edit .gitignore | |
| $ git init | |
| $ git add . | |
| $ git commit -m "Initial commit" | |
| Create on Github the repo | |
| $ git remote add origin git@github.com:<username>/demo_app.git | |
| $ git push -u origin master | |
| == MODELING == | |
| $ rails generate scaffold User name:string email:string | |
| # Example of rails scaffolding a table called User with primary key 'id'; 'name' as column, type string and 'email' as | |
| # column, type string also | |
| $ bundle exec rake db:migrate | |
| # To proceed with the demo application, we first need to migrate the database using Rake. | |
| # This simply updates the database with the new models | |
| # Note that, in order to ensure that the command uses the version of Rake corresponding to our Gemfile, | |
| # we need to run rake using bundle exec. | |
| Modify the relations between tables/models | |
| == DEPLOY == | |
| $ heroku create --stack cedar | |
| $ git push heroku master | |
| $ heroku run rake db:migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment