gem install rails --pre
rails new my_app -T
| # Guide | |
| # Configure the essential configurations below and do the following: | |
| # | |
| # Repository Creation: | |
| # cap deploy:repository:create | |
| # git add . | |
| # git commit -am "initial commit" | |
| # git push origin master | |
| # | |
| # Initial Deployment: |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # http://rspec.info/ | |
| # http://peepcode.com/products/rspec-user-stories | |
| # http://dannorth.net/whats-in-a-story | |
| # http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1 | |
| # http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/ | |
| # http://www.benmabey.com/2008/02/04/rspec-plain-text-stories-webrat-chunky-bacon/ | |
| # http://www.chariotsolutions.com/slides/pdfs/ete2008-IntegrationTestingWithRSpec.pdf | |
| # http://www.joesniff.co.uk/ruby/telling-a-good-story-rspec-stories-from-the-trenches.html | |
| # How does using stories help testing? |
| Add the following code snippet to the config.js file to force all pasted text into the editor window as plain text. | |
| config.forcePasteAsPlainText = true; |
| require "bundler/capistrano" | |
| # Define your server here | |
| server "<server>", :web, :app, :db, primary: true | |
| # Set application settings | |
| set :application, "<app_name>" | |
| set :user, "<deployment_user>" # As defined on your server | |
| set :deploy_to, "/home/#{user}/apps/#{application}" # Directory in which the deployment will take place | |
| set :deploy_via, :remote_cache |
| $('a[href$=".pdf"]').click(function(e) { | |
| e.preventDefault(); | |
| window.open(this.href); | |
| }); |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| sudo mkdir /var/mysql | |
| sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock |