Frederick Cheung wrote:
> On Apr 30, 4:41�pm, Shilo Ayalon <[email protected]>
> wrote:
>
>> my validations are in a file inside lib folder:http://pastie.org/463883
>>
>> Not so sure what I'm doing wrong, since all of that worked great while
>> in development mode. I'd appreciate any help offered - thanks.
>
> see this blog post I wrote a few months ago:
> http://www.spacevatican.org/2008/11/21/environment-rb-and-requiring-dependencies
>
> Fred
I read your post, which made sense. So, I moved all my requires into the
initializer in the environment.rb file.
Rails then complained that it couldn't find active record, so I added
require 'activerecord', though it didn't seem right (rails should know
what that is). It then complained it doesn't know what the downcase
method ("Some string".downcase) is, which seems pretty basic.. so I'm
not sure what I'm messing up.
# my file:
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
#.. some default configs, like session, timezone
require 'rubygems'
require 'activerecord'
require 'lib/custom_validations'
require 'will_paginate'
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---