Skip to content

Instantly share code, notes, and snippets.

Started PATCH "/pages/brians-story" for 127.0.0.1 at 2013-11-18 22:33:51 -0800
Processing by PagesController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"4FANM+OKSkwz+0NNv4/FweGNGfizVNEyG6upaTeEVV0=", "page"=>{"id"=>"8", "title"=>"Brian's Story ", "urltext"=>"brians-story", "content"=>"<h1 style=\"TEXT-ALIGN: left\" _mce_style=\"text-align: left;\" mce_style=\"text-align: left;\">3 How the Journey Began...Brian's Story</h1>\r\n<div class=\"image_with_caption float_left\"><img title=\"brian's portrait\" alt=\"brian's portrait\" src=\"http://www.briansjourney.com/images/content/brian/brian.jpg\" _mce_src=\"../../images/content/brian/brian.jpg\" mce_src=\"../../images/content/brian/brian.jpg\"> \r\n<div class=\"caption\">Brian Douglas LaViolette <br>1977 - 1992</div></div>\r\n<p>Through great loss has come inspiration.</p>\r\n<p>One family's tragedy has given others the chance to pursue their highest dreams and aspirations.</p>\r\n<p>Today, Brian LaViolette's positive outlook and spirit live
Started GET "/about/who-we-are" for 127.0.0.1 at 2013-11-16 17:01:53 -0800
Processing by PagesController#show as HTML
Parameters: {"section"=>"about", "id"=>"who-we-are"}
DEPRECATION WARNING: Relation#first with finder options is deprecated. Please build a scope and then call #first on it instead. (called from show at /Users/benlieb/my_life/sites/2009/briansjourney.com/apps/briansjourney/app/controllers/pages_controller.rb:33)
Page Load (0.4ms) SELECT `pages`.* FROM `pages` WHERE (urltext = 'who-we-are') ORDER BY `pages`.`id` ASC LIMIT 1
Rendered pages/show.html.erb within layouts/application (0.5ms)
Completed 200 OK in 97ms (Views: 91.2ms | ActiveRecord: 0.4ms)
| stories/
| | steps/
| | users/
| | all.rb
| | helper.rb
| | rest_auth_stories.rb
| | rest_auth_stories_helper.rb
this.reload = function() {
$.get('myurl', function( data ) {
alert($(this));
});
}
csee /var/www/apps/staging/current: gem --debug update --system
Exception `NameError' at /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:134 - uninitialized constant Gem::Commands::UpdateCommand
Updating RubyGems
Exception `Gem::RemoteFetcher::FetchError' at /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:164 - bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
Exception `Gem::RemoteFetcher::FetchError' at /usr/local/lib/site_ruby/1.8/rubygems/commands/update_command.rb:142 - bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
/usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:164:in `fetch_size'
/usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:199:in `l
if (!download_data.getBoolean("currently_downloading", false))
{
//find the first one whose percent is 0 and start it.
Map<String, ?> items = download_data.getAll();
for(Map.Entry<String,?> entry : items.entrySet()){
if (entry.getValue() instanceof Integer) { //this is a cheap way to test if the key/value pair is 'about' a download. All other values, e.g. 'currently_downloading' are not Integers. This may change.
if (entry.getValue() == 0)
{
Integer position = Integer.parseInt(entry.getKey());
Download d = new Download();
downloaded_data.edit().putInt(position+"", percent);
downloaded_data.edit().commit();
>> Rails.cache.write('test', "foo", :expires_in => 1)
=> "foo"
>> #waiting 10 seconds
?> Rails.cache.read('test')
=> "foo"
@benlieb
benlieb / deploy.rb
Last active December 20, 2015 07:49
require 'capistrano/ext/multistage'
require 'railsmachine/recipes'
set :application, "REMOVED"
set :domain, "REMOVED.org"
role :web, domain
role :app, domain, :primary => true
role :db, domain, :primary => true
before_filter :current_user_to_AR
protected
def current_user_to_AR
cu = current_user
ActiveRecord::Base.send(:define_method, "current_user", proc {cu})
end