This file contains 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
0x86746FbeFF0E5f13C4D03436feEFEc26dc82b85F |
This file contains 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
1. first install the ruby you want to use, say 1.9.3 (rvm install 1.9.3) | |
2. create gemset for project, say proj (rvm gemset create proj) | |
3. then say 'rvm 1.9.3@proj'. this will cause rvm to use the specified ruby version and the specified gemset hereon | |
4. now install the rails version you want to use in this project: 'gem install rails -v 3.2.14' will install rails 3.2.14 in the proj gemset | |
5. now you can create your project with rails new... | |
6. After the project is created, from the project directory run: | |
7. rvm --ruby-version use 1.9.3@proj This will add .ruby-version and .ruby-gemset files to the project and make sure that anytime you switch to this project directory, the correct ruby version and gemset are used. | |
8. To find where rubies and gems for the current gemset are installed do: rvm info |
This file contains 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
secret = "xxx" | |
data = "http://someurl?someparams" | |
hmac = OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new('sha1'), secret.encode("ASCII"), data.encode("ASCII")) | |
signature = Base64.encode64(hmac).chomp |
This file contains 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 File.expand_path('../boot', __FILE__) | |
# Pick the frameworks you want: | |
# require "active_record/railtie" | |
require "action_controller/railtie" | |
require "action_mailer/railtie" | |
require "active_resource/railtie" | |
require "sprockets/railtie" | |
require "rails/test_unit/railtie" |
This file contains 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
!!! 5 | |
%html{:lang => "en"} | |
%head | |
%meta{:charset => "utf-8"} | |
%title {{ site.name }} | |
%meta{:content => "", :name => "description"} | |
%meta{:content => "", :name => "author"} |
This file contains 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
MONGOHQ_URL='mongodb://heroku:[email protected]:10016/app4941383' RAILS_ENV=production rails console | |
...loading heroku extension | |
/Users/sony/.rvm/gems/ruby-1.9.3-p194/gems/excon-0.13.4/lib/excon/connection.rb:266:in `request_kernel': Expected(200) <=> Actual(404 Not Found) (Heroku::API::Errors::NotFound) | |
request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encoding"=>"gzip", "Authorization"=>"Basic OmNjYzY1ZmMyNTFkODY1MmQ2NWJhOWVkMTA1MjJjM2E2NTc4NmRiNzM=", "User-Agent"=>"heroku-rb/0.1.8", "X-Heroku-API-Version"=>"3", "X-Ruby-Version"=>"1.9.3", "X-Ruby-Platform"=>"x86_64-darwin11.3.0", "Host"=>"api.heroku.com:443"}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/Users/sony/.rvm/gems/ruby-1.9.3-p194/gems/excon-0.13.4/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"api.heroku.com", :path=>"/apps/homeschool_minder/domains", :port=>"443", :query=>nil, :scheme=>"https", :expects=>2 |