On the server:
$ /etc/init.d/unicorn stop
On the server, in mysql client:
module MyModule | |
# This responder can be used with service objects. | |
# | |
# result = MyService.new.call | |
# respond_with result, location: -> { payments_cards_path } | |
# | |
# Assumption: When we call the service, we get a status/response object which responds to `success?` method. | |
# If response is successful, then the response object also responds to `data` method. If response is a | |
# failure, the response object responds to `error` method. |
# In order to make this script work, gemfury gem needs | |
# to be added to my_gem.gemspec as development dependency. | |
cd ~/Projects/my_gem | |
gem bump --version patch --push && bundle exec rake build && bundle exec fury push pkg/`ls -tr pkg |tail -1` --as user |
module AuthHelperMethods | |
# Call callback_url method from inside another class as below: | |
# | |
# AuthHelperMethods.callback_url('a', 'b', 1) | |
# | |
def callback_url(base_url, provider, app_id) | |
[base_url, "/members/auth/#{provider}/callback/#{app_id}"].join | |
end |
<iframe src="https://player.vimeo.com/video/37382619" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="https://vimeo.com/37382619">Dark Secrets - Hacking Team commercial</a> from <a href="https://vimeo.com/waveaudio">Wave Audio</a> on <a href="https://vimeo.com">Vimeo</a>.</p> |
You have a nil object when you didn't expect it! | |
You might have expected an instance of ActiveRecord::Base. | |
The error occurred while evaluating nil.[] (NoMethodError) | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/formatter/console.rb:132:in `print_tag_limit_warnings' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/formatter/console.rb:130:in `each' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/formatter/console.rb:130:in `print_tag_limit_warnings' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/formatter/pretty.rb:232:in `print_summary' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/formatter/pretty.rb:27:in `after_features' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/ast/tree_walker.rb:170:in `__send__' | |
/usr/lib/ruby/gems/1.8/gems/cucumber-0.3.103/bin/../lib/cucumber/ast/tree_walker.rb:170:in `send_to_all' |
title = "abc" | |
[1,2].each do |p| | |
puts title | |
end |
+----+-------------+-------------+-------------------+-------------------+-----------------+----------+ | |
| id | component_a | component_b | component_a_model | component_b_model | connection_type | position | | |
+----+-------------+-------------+-------------------+-------------------+-----------------+----------+ | |
| 19 | 7 | 3 | 1 | 2 | 1 | NULL | | |
| 20 | 3 | 7 | 2 | 1 | 1 | NULL | |
<style> | |
ul li:first-child { | |
color: green; | |
} | |
ul li:last-child { | |
color: red; | |
} | |
</style> | |
<ul> | |
<li>1</li> |