search for: require_depend

Displaying 20 results from an estimated 160 matches for "require_depend".

Did you mean: require_dependcy
2005 Sep 27
5
Am I misunderstanding "require_dependency"?
Hi From what I understand about documentation about require_dependency, this function will work like require but the file will be reloaded on every request to the server when in development mode. I have bootstrapped am minimal RoR project with 0.13.1 Rails. I have created a minimal Controller and hooked up it''s "index" action at the sit...
2006 Jan 29
15
Reload the lib directory
Im writing a module in the lib directory. If I change the module, the changes are not visible to the application when i releod the web page (i am in the development evironment). I must restart the web server (WEBrick) and so i see the changes... but I lost more time. How can I reload the module in the dirictory lib, without reload WEBrick? Thanks so much --Reis -- Posted via
2012 Apr 07
3
Is require_dependency supposed to be a public API?
...9;'t it be documented in the Rails API? Or is there a better way to allow class reloading of my files under lib. I mean, I know about config.autoload_paths, but I want to be explicit about my requires. I just want to be able to reload then on each request when I''m working on them. require_dependency seems to do just that but I''m worried since it is not mentioned in the official public API. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To...
2008 Nov 03
1
concerned_with, and maybe require_dependency issues only when running specs?
...y stubbed/mocked out. It seems like in those other specs, the User class doesn''t have "something_method" defined. (the failure message is undefined_method "something_method" for #<Class:0x243626c> Anybody have any ideas? I have a feeling it''s related to require_dependency or something, but I''m not really sure. I''ve turned on logging in require_dependency, and it seems like the files are being required. Any help would be great, thanks! Cameron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.o...
2007 Mar 13
0
aliasing, require_dependency and require
...ed into 4 parts: - Setup of rails app and initial version of app/controllers/application.rb - Setup of plugin which will alias the method in application.rb and initial attempt without loading ''application'' The interesting parts (for me) are the last two frames: Firstly, I use require_dependency to load ApplicationController but as you can see the aliasing doesn''t work (funnily enough the xxx_with/out methods are defined). Secondly, I use ''require'' to load ApplicationController and here aliasing works as it should but I''m losing reloading of applica...
2009 May 08
3
STI and subclassing twice
I''m trying using STI to implement a hiearchy similar to this: script/generate scaffold name:string type:string class Person < ActiveRecord::Base; end class Customer < Person; end class Employee < Person; end class Developer < Employee; end I.e., there are two levels of inheritance (Developer < Employee < Person). When creating a Customer, Rails understands
2012 Jun 07
3
Couldn't reload a module when it's changed. Tried :require_dependency, :watchable_dirs, :unloadable
I''m completely messed with module reloading in development mode. I have to restart app server each time I edit lib/z/nginx.rb which is included in app/models/user_case.rb app/models/user_case.rb require_dependency ''z/nginx'' class UserCase < ActiveRecord::Base include Z::Nginx unloadable I added to environment.rb config.watchable_dirs[''lib''] = [:rb] config.watchable_dirs[''lib/z''] = [:rb] ActiveSupport::Dependencies.explicitly_unload...
2007 Nov 28
8
include vs. require vs. require_dependency
i am struggling a bit with all of them .. could someone be so nice a describe me the exact differences, pros & cons of all of them ... thx a lot! -- 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
2006 Mar 22
2
Edge Rails (1.1.0 RC1) and Typo Trunk
.../lib///activesupport/lib/ active_support/dependenciesrb:56:in `require_or_load'' /vendor/rails/activerecord/lib///activesupport/lib/ active_support/dependenciesrb:30:in `depend_on'' /vendor/rails/activerecord/lib///activesupport/lib/ active_support/dependenciesrb:74:in `require_dependency'' /vendor/rails/activerecord/lib///activesupport/lib/ active_support/dependenciesrb:74:in `require_dependency'' /app/controllers/textfilter_controllerrb:113 /app/controllers/textfilter_controllerrb:112:in `each'' /app/controllers/textfilter_controlle...
2008 Nov 18
3
Code changes are ignored due to code minor ver. were cached
Hi there! I study Ruby on Rails and met a problem. I placed a class definition code for class which is NOT a Model into separate file, assume MyToolClass.rb Then I started working on controller code and required ''MyToolClass'' While working on controller code I also corrected some code in MyToolClass.rb, but it seemed, that changes in MyTooolClass.rb were ignored by Rails until
2006 May 26
2
Rails app fails to start with LoginGenerator
...ms/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in `require_or_load'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in `depend_on'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency'' #{RAILS_ROOT}/lib/login_system.rb:1 /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:140:in `load'' /usr/lib/ruby/gems/1.8/g...
2006 Apr 11
9
Rails failure after upgrade to 1.1.2
...ms/1.9/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in `require_or_load'' /usr/lib/ruby/gems/1.9/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:30:in `depend_on'' /usr/lib/ruby/gems/1.9/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency'' /usr/lib/ruby/gems/1.9/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in `require_dependency'' /usr/lib/ruby/gems/1.9/gems/rails-1.1.2/lib/dispatcher.rb:69:in `prepare_application'' /usr/lib/ruby/gems/1.9/gems/rails-1.1.2/lib/dispatcher.rb:37:in `dispat...
2006 Feb 09
0
Extending ActiveRecord creates TypeError
...esupport-1.2.5/lib/ active_support/dependencies.rb:39:in `require_or_load'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:22:in `depend_on'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:178:in `require_dependency'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:178:in `require_dependency'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/dependencies.rb:72:in `require_dependencies'' /usr/lib/ruby/gems/1.8/g...
2005 Aug 10
1
using modules with models?
...s/some_module. I keep getting this: /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:186:in `const_missing'': uninitialized constant SomeClass (NameError) So, I tried creating a file called ''some_module.rb'' in app/models that had this: require_dependency ''some_module/some_class'' that seemed to work unless I have a class named SomeClass without a module name, which kind of defeats the purpose of modules. So, is there any way I can get this to work, or should I put all this code in lib instead? Kurtis Seebaldt
2006 Jan 18
1
Another uninitialized constant question
Guys, I''m trying to generate a scaffold to admin a table called hangars. I''d like the controller to fall with an "admin" sub-module. I used the command: script/generate scaffold Hangar Admin::Hangar This seemed to work, and placed the controller in controllers/admin/hangar_controller.rb, where I expected to find it. It also created the hangar.rb model in
2011 Apr 08
5
How to extend a helper using plugin?
...esult to it''s liking. Anything I''ve tried so far exposes this behavior: the first render of a page uses the extended version, while every later renders use the original unmodified helper. I''ve tried to include my patch module in the plugin''s init.rb like this: require_dependency ''application_helper'' ApplicationHelper.send(:include, RedminePastebin::ApplicationHelperPatch) Also I''ve tried to define my ApplicationHelper in myplugin/app/helper/ application_helper.rb with the same effect. Both approaches used self.included hook to call alias_me...
2005 Mar 06
12
Where to place custom classes?
Hi all, I am writing a simple shopping cart which will consist of a single class. There will be no DB table for carts so I do not want to make my Cart a model. But where do I place my Cart class so that I can access it in my controllers? I want to be able do do things like this (for instance in a shop controller): def add_to_cart @session[''cart''].add(article_id, amount)
2006 Mar 25
1
Question about upgrading to rails rc1.1
...lowing is the failed log: c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5.4008/lib/active_support/depen dencies.rb:30:in `depend_on'': stack level too deep (SystemStackError) from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5.4008/lib/active_ support/dependencies.rb:74:in `require_dependency'' from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5.4008/lib/active_ support/dependencies.rb:104:in `rake_original_const_missing'' from c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake.rb:1761:in `cons t_missing'' from ./script/../confi...
2005 Dec 27
4
Using mocks
Hi, What's the purpose of test/mocks? I couldn't quite complete the Wiki entry on this because all the information I _could_ find was in the readme. - Rowan -- Morality is usually taught by the immoral. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2008 Oct 16
5
2 Models: Same name, different namespace => Problems
Let''s start with an example: --- class Comment < ActiveRecord::Base end # dummy (to invent a "table namespace") class Review < ActiveRecord::Base end # ... dummy # is "review_comments" in the database class Review::Comment < ActiveRecord::Base belongs_to :thing end class Review::Thing < ActiveRecord::Base has_many :comments, :class_name =>