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
ruby -v | |
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-linux] | |
gem -v | |
1.8.5 | |
bundle -v | |
Bundler version 1.0.14 |
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
Thu May 26 00:32:41 [conn2] building new index on { coordinates: "2d" } for example_com_development.offices | |
mem info: before index start vsize: 2565 resident: 20 mapped: 80 | |
Thu May 26 00:32:41 [conn2] external sort root: /usr/local/var/mongodb/_tmp/esort.1306384361.1156987600/ | |
Thu May 26 00:32:41 [conn2] d->nIndexes was 3 | |
Thu May 26 00:32:41 [conn2] IndexDetails::kill(): couldn't drop ns example_com_development.offices.$coordinates_2d | |
Thu May 26 00:32:41 [conn2] insert example_com_development.system.indexes exception 13026 geo values have to be numbers: { 0: null, 1: null } 6ms |
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
class UploadController < ApplicationController | |
def admission | |
@all=Upload.all | |
params[:upload]['item'] += "_#{Time.now.to_i}" if params[:upload]['item'].present? | |
#doing Time.now.to_i will give you better results for filenames then to_s | |
@upload=Upload.new(params[:upload]) | |
#@upload.uploaded_at = Time.now #This should happen automagically though | |
if @upload.save | |
flash[:notice]="File uploaded successful,please wait for processing " | |
else |
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
c = Configuration.new | |
c.instance_eval(File.read('config_file.rb')) |
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
module Paperclip | |
class << self | |
def logger #:nodoc: | |
Rails.logger | |
end | |
end | |
end | |
module Mongoid::Document::Extensions | |
module InstanceMethods |
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
ubuntu /var/www/staging.example.com/current: sudo gem install bundler --pre | |
Successfully installed bundler-1.0.0.beta.9 | |
1 gem installed | |
Installing ri documentation for bundler-1.0.0.beta.9... | |
Installing RDoc documentation for bundler-1.0.0.beta.9... | |
#^#^# JUST to show I have the latest bundler installed #^#^# | |
ubuntu /var/www/staging.example.com/current: bundle install | |
Fetching source index for http://rubygems.org/ | |
fatal: Not a valid object name 5ebc1d8 | |
An error has occurred in git. Cannot complete bundling. |
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
Loading development environment (Rails 3.0.0.beta4) | |
>> p = Product.first | |
=> #<Product _id: 4c49f114b57f98927c000001, name: "test", created_at: Fri Jul 23 19:44:22 UTC 2010, updated_at: Fri Jul 23 19:44:22 UTC 2010> | |
>> pu = Purchaser.new(:name => 'bob') | |
=> #<Purchaser _id: 4c49f26fb57f989391000001, name: "bob"> | |
>> p.purchasers << pu | |
=> [#<Purchaser _id: 4c49f26fb57f989391000001, name: "bob">] | |
>> p.save | |
src/tcmalloc.cc:353] Attempt to free invalid pointer: 0x225330 |
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
source 'http://rubygems.org' | |
gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'credit_card_validator' | |
#Database stuff | |
gem "bson_ext" | |
gem 'mongoid', :git => 'git://github.com/durran/mongoid.git', :require => 'mongoid' |
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
Using RSpec | |
Loading Spork.prefork block... | |
- Spork Diagnosis - | |
-- Summary -- | |
config/application.rb | |
config/boot.rb | |
config/environment.rb | |
config/initializers/app_settings.rb | |
config/initializers/backtrace_silencers.rb | |
config/initializers/compass.rb |
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
~/rails_apps/example.com% rails c | |
DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from <class:Railtie> at /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/will_paginate-3.0.pre/lib/will_paginate/railtie.rb:6) | |
/Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/bson-1.0.3/lib/bson/bson_c.rb:24:in `serialize': keys must be strings or symbols (TypeError) | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/bson-1.0.3/lib/bson/bson_c.rb:24:in `serialize' | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/mongo-1.0.3/lib/mongo/cursor.rb:364:in `construct_query_message' | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/mongo-1.0.3/lib/mongo/cursor.rb:346:in `send_initial_query' | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/mongo-1.0.3/lib/mongo/cursor.rb:324:in `refill_via_get_more' | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example/gems/mongo-1.0.3/lib/mongo/cursor.rb:319:in `num_remaining' | |
from /Users/andrew/.rvm/gems/ruby-1.9.2-head@example |