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
| class RemoveFkIndices < ActiveRecord::Migration | |
| # Remove old foreign key remains | |
| def self.up | |
| # MySQL and ActiveRecord produce problems with each other: | |
| # http://lists.mysql.com/mysql/204151 | |
| # http://lists.mysql.com/mysql/204199 | |
| # http://bugs.mysql.com/bug.php?id=10333 | |
| # AR seems to guess the wrong foreign key name, which it can't remove. |
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 'digest/sha1' | |
| class Authenticator::DatabaseAuthenticationController < Authenticator::AuthenticatorController | |
| $general_layout_path = 'layouts/backend/' + $theme + '/general' | |
| layout $general_layout_path | |
| def login_form_path | |
| "/leihs/authenticator/db/login" |
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
| ======= This is on the machine that has rvm ============ | |
| rca@futsch:~/work/code/ror/leihs/vendor/bundle$ rvm --version | |
| rvm 1.10.0 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/] | |
| rca@futsch:~/work/code/ror/leihs/vendor/bundle$ bundle --version | |
| Bundler version 1.0.21 | |
| rca@futsch:~/work/code/ror/leihs/vendor/bundle$ bundle exec gem list rspec |
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
| stat64("/home/rca/.rvm/gems/ruby-1.8.7-p352/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/home/rca/.rvm/gems/ruby-1.8.7-p352@global/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/home/rca/.rvm/rubies/ruby-1.8.7-p352/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/home/rca/.rvm/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/usr/local/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/usr/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/bin/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/usr/local/games/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) | |
| stat64("/usr/games/rspec", 0xbfe29220) = -1 ENOENT (No such file or directory) |
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
| class ShippingCalculators::ShippingCalculator < ActiveRecord::Base | |
| set_table_name 'shipping_calculators' | |
| serialize :configuration, OpenStruct | |
| belongs_to :tax_class | |
| def initialize | |
| @cost = BigDecimal.new("0") | |
| @taxes = BigDecimal.new("0") | |
| @gross_cost = BigDecimal.new("0") |
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
| Loading development environment (Rails 3.1.1) | |
| pry(main)> wb = ShippingCalculators::WeightBased.new | |
| => #<ShippingCalculators::WeightBased:0x64bcf5c> | |
| pry(main)> wb.inspect | |
| NoMethodError: undefined method `has_key?' for nil:NilClass | |
| from /home/rca/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/whiny_nil.rb:48:in `method_missing' | |
| pry(main)> wb.name = "foo" | |
| NoMethodError: You have a nil object when you didn't expect it! | |
| You might have expected an instance of Array. | |
| The error occurred while evaluating nil.delete |
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
| # This triggers said error, but only in our Rails 3.1.3 application, not in a blank Rails 3.1.3 application! | |
| class DownloadController < ApplicationController | |
| def download | |
| send_file("/tmp/test.txt") | |
| 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
| parse error on value "}" (tRCURLY) | |
| /home/rca/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/racc/parser.rb:349:in `on_error' | |
| /home/rca/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/racc/parser.rb:99:in `_racc_do_parse_c' | |
| /home/rca/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/1.9.1/racc/parser.rb:99:in `do_parse' | |
| /home/rca/.rvm/gems/ruby-1.9.2-p318/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:750:in `process' | |
| /home/rca/.rvm/gems/ruby-1.9.2-p318/gems/gettext_i18n_rails-0.4.5/lib/gettext_i18n_rails/ruby_gettext_extractor.rb:55:in `run' | |
| /home/rca/.rvm/gems/ruby-1.9.2-p318/gems/gettext_i18n_rails-0.4.5/lib/gettext_i18n_rails/ruby_gettext_extractor.rb:26:in `parse_string' | |
| /home/rca/.rvm/gems/ruby-1.9.2-p318/gems/gettext_i18n_rails-0.4.5/lib/gettext_i18n_rails/haml_parser.rb:20:in `parse' | |
| /home/rca/.rvm/gems/ruby-1.9.2-p318/gems/gettext-2.2.0/lib/gettext/tools/rgettext.rb:140:in `block (2 levels) in parse' |
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
| From: /home/rca/work/code/ror/leihs/app/controllers/application_controller.rb @ line 72 ApplicationController#set_gettext_locale: | |
| 67: end | |
| 68: | |
| 69: I18n.locale = locale_symbol | |
| 70: FastGettext.locale = locale_symbol.to_s | |
| 71: | |
| => 72: binding.pry | |
| 73: | |
| 74: 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
| From: /home/rca/work/code/ror/leihs/app/controllers/application_controller.rb @ line 65 ApplicationController#set_gettext_locale: | |
| 60: current_user.language = language # language is a protected attribute, it can't be mass-asigned via update_attributes | |
| 61: current_user.save | |
| 62: current_user.reload | |
| 63: end | |
| 64: locale_symbol = current_user.language.locale_name.to_sym | |
| => 65: binding.pry | |
| 66: else | |
| 67: locale_symbol = Language.default_language.locale_name.to_sym |