search for: load_once_paths

Displaying 9 results from an estimated 9 matches for "load_once_paths".

2008 Feb 11
3
Should there be trouble w/has_many_polymorphs in a plugin?
Folks, As much as I like generators, I''d greatly prefer to just throw my has_many_polymorphs tagging and commenting engines into projects as plugins. However, after transplanting my tag.rb and tagging.rb files into the lib folder of a ''has_many_tags'' plugin and adding the obligatory plugin requirements (init.rb and an include in environment.rb), I''m not having
2010 Mar 01
4
Dependency loading confusion
...dependency loading/unloading magic. So, I guess I can make it into a plugin, but it''s really very simple and quite specific to my application, so it''s not worth the effort. That''s why I want to keep it only in lib. Things I tried: - Putting the lib/foo path into config.load_once_paths in config/ environment.rb - adding unloadable to the Foo::Base module - moving the include line (ActiveRecord::Base.send(:include, ...) into config/initializers/foo.rb But nothing helps :( Any help will be appreciated. Thanks. adam. -- You received this message because you are subscribed to th...
2008 Aug 24
2
config.after_initialize and development mode
Hi, I''m using activemerchant and setting up a class variable using config.after_initialize. It works great for the first request, but then the variable is nil. config.after_initialize do ActiveMerchant::Billing::Base.mode = :test OrderTransaction.gateway = ActiveMerchant::Billing::PaypalGateway.new(...) end I''m assuming this is is due to the model reloading after each
2007 Mar 02
2
ActMethods has been removed from the module tree ???
Hello, I wrote a light weight version of acts_as_attachment and this has been working fine for some time now (about a week). Now i get the title error: ActMethods has been removed from the module tree but is still active! I have updated edge rails a few times as my project uses active_resource. The closest thing ive found is an AAA post on beast forum: http://beast.caboo.se/forums/2/topics/664
2007 Dec 10
1
Restrat server
I have this file in my lib directory that I am using to encrypt/decrypt some stuff. While I am debugging it I have to contsantly start and restart the server in order for the changes to take effect (or for them to be recognized), why is that? Thanks, -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2011 Mar 28
0
undefined method "load_paths" for ActiveSupport::Dependencies:Module Error
...models appear like files in the main app directory (as it was said) this is the code: %w{ models }.each do |dir| path = File.join(File.dirname(__FILE__), ''app'', dir) $LOAD_PATH << path ActiveSupport::Dependencies.load_paths << path ActiveSupport::Dependencies.load_once_paths.delete(path) end __________________________________________________________ When i run ''rails console '' this error appear undefined method `load_paths'' for ActiveSupport::Dependencies:Module (NoMethodError) thanks for your help -- You received this message because you...
2010 Aug 29
4
Wrong class being returned in association
I''m using Rails 3.0.0rc and have the following models: class User  has_many :readings  has_many :conversations, :through=>:readings end class Reading  belongs_to :user  belongs_to :conversation end class Conversation  has_many :readings  has_many :users, :through=>:readings end and this controller code: class ConversationsController  def show    @user =
2008 May 14
7
A copy of XX has been removed from the module tree but is still active!
I have a class in my /lib/ directory called tracker.rb It''s function is to receive an array of URLs and then perform 4 separate tasks on each URL Each of the 4 tasks gets it''s own thread. the class is called from my controller like: output = Tracker.go([array_of_urls]) Sometimes, when it hits an exception, instead of just dieing gracefully, my logs repeatedly display: A
2008 Jan 15
6
Rails plugins that use other plugins - why is does this seem impossible?
OK, probably the most frustrated I''ve ever been with Rails. If I don''t figure this out, I''m going to, um... try again tomorrow. I''m simply trying to create a plugin. I did the ./script/generate plugin MY_NEW_PLUGIN and wha-hoo great! Well, not really... This plugin uses other plugins. For example, acts_as_list, acts_as_money etc.. How the heck to I get these