- watch for ActiveRecord Relation, like
has_many,has_many :through - watch for
user_roles, `group_users - UPDATE
action
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
| #!/bin/sh | |
| # | |
| # chkconfig: 35 99 99 | |
| # description: Node.js /home/nodejs/sample/app.js | |
| # | |
| . /etc/rc.d/init.d/functions | |
| USER="nodejs" |
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 gems on Macintosh OS X | |
| group :test do | |
| gem 'rspec-rails', '2.9.0' | |
| gem 'capybara', '1.1.2' | |
| gem 'rb-fsevent', '0.4.3.1', :require => false | |
| gem 'growl', '1.0.3' | |
| end | |
| # Test gems on Linux | |
| group :test do |
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
| xmodmap -e "keycode 94 = backslash bar" |
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 'spec_helper' | |
| describe "Static pages" do | |
| subject { page } | |
| shared_examples_for "all static pages" do | |
| it { should have_selector('h1', text: heading) } | |
| it { should have_selector('title', text: full_title(page_title)) } | |
| 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
| # RVM Bundler Integration | |
| $ rvm get head && rvm reload | |
| $ chmod +x $rvm_path/hooks/after_cd_bundler | |
| # Then run these: | |
| $ cd ~/rails_projects/sample_app | |
| $ bundle install --without production --binstubs=./bundler_stubs | |
| __________________________________________________________________ |
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
| // Include http module, | |
| var http = require("http"), | |
| // And url module, which is very helpful in parsing request parameters. | |
| url = require("url"); | |
| // Create the server. | |
| http.createServer(function (request, response) { | |
| // Attach listener on end event. | |
| request.on('end', function () { | |
| // Parse the request for arguments and store them in _get variable. | |
| // This function parses the url from request and returns object representation. |
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 apt-get build-dep tmux | |
| git clone https://github.com/ThomasAdam/tmux.git | |
| cd tmux/trunk | |
| ./autogen.sh | |
| ./configure --prefix=/usr/local | |
| make |
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
| =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') |
In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.
- Create new server
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
OlderNewer