search for: load_path

Displaying 20 results from an estimated 143 matches for "load_path".

2006 Aug 10
4
1.1.5 Upgrade and config.load_path not working
Hey, I am trying to upgrade to 1.1.5 and rails no longer finds my controllers the live outside app/controllers. I was on 1.1.2 previously and here is my setup In environment.rb config.load_paths += [File.join(File.expand_path(RAILS_ROOT), "rails_shared/controllers") ] config.load_paths += [File.join(File.expand_path(RAILS_ROOT), "rails_shared/helpers") ] config.load_paths += [File.join(File.expand_path(RAILS_ROOT), "rails_shared/lib") ] And within rai...
2008 Jan 29
4
Setting up release-1.0.1
...== --- script/backgroundrb (revision 313) +++ script/backgroundrb (working copy) @@ -6,8 +6,10 @@ WORKER_ROOT = rails_root + "/lib/workers" SERVER_LOGGER = rails_root + "/log/backgroundrb_server.log" -["server","framework","lib"].each { |x| $LOAD_PATH.unshift(PACKET_APP + "/#{x}")} -$LOAD_PATH.unshift(WORKER_ROOT) +#["server","framework","lib"].each { |x| $LOAD_PATH.unshift(PACKET_APP + "/#{x}")} +["server","framework","lib"].each { |x| $:.push(PACKET_APP + "...
2006 Jul 19
3
Component Question
It appears that in Rails''s initializer.rb, the $LOAD_PATH is initialized with the paths for all the components included in the app before the models. This has the effect that if there is Foo class in your models directory and a Foo class in a component you''ve included, the Rails loader loads the component and not the model from your models di...
2009 Jul 02
1
config.load_paths
Hi As a part of rearranging the code I put my reports in the folder app/models/reports and loaded that using config.load_paths Is there any performance issue in doing this? Is this the right approach? or I have to put all the files in reports to app/models so to avoid config.load_paths #{folder} I expect your valuable comments Thanks -- Posted via http://www.ruby-forum.com/.
2011 Mar 28
0
undefined method "load_paths" for ActiveSupport::Dependencies:Module Error
...://guides.rubyonrails.org/plugins.html so i used the following code taken from this site in order to make the 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...
2006 Aug 09
0
load_paths on godaddy hosted account
I am trying to get typo to load on my godaddy account. I''ve loaded other home grown apps and they work. I get issues when trying to load libraries from my vendor directory. In my enviroment.rb I have config.load_paths += %W( vendor/rubypants vendor/akismet vendor/redcloth/lib vendor/bluecloth/lib vendor/flickr vendor/syntax/lib vendor/sparklines/lib vendor/uuidtools/lib vendor/jabber4r/lib vendor/rails/railties vendor/rails/railties/lib vendor/rails/actionpack/lib...
2008 May 30
1
Adding vendor folder to $load_path
I''m using backgroundrb in a rails project, with packet and chronic unpacked in the vendor folder, to make backgroundrb I''ve added the following line to scribts/backgroundrb $LOAD_PATH << File.join(RAILS_HOME, "vendor") Do you believe it''s a good idea? I don''t like depend on the installed gems ciao ciao paolo -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/att...
2008 Jan 15
6
Rails plugins that use other plugins - why is does this seem impossible?
..... This plugin uses other plugins. For example, acts_as_list, acts_as_money etc.. How the heck to I get these plugins loaded and ready to be used? I''ve put them here: main-app/vendor/plugins/MY_NEW_PLUGIN/vendor/plugins/ I''ve added all of their paths and lib paths to the config.load_paths variable, I''ve tried loading (require and load) their init.rb files. And no matter what, it''s pretty obvious that the paths aren''t setup correctly. I''ve even tried $: << ''path/to/acts_as_list'' $: << ''path/to/acts_as_list/l...
2006 Aug 10
5
Major security vulnerability in the latest Rails 1.1.5
Hi, I think there is still a major vulnerability exists in the latest Rails 1.1.5. The problem is in the routing.rb file and safe_load_paths method. Because of the erroneous regexp it is possible to perform a DOS attack on any rails application. To reproduce: 1. start your application 2. use this url: http://localhost:3000/debug Routing module will load standard debug.rb script which stops a dispatcher process waiting for a terminal...
2006 Jan 05
2
how to use a helper which is not inside app/helpers/
Hi, I wish to know it is possible to use a helper which is not inside the folder ''app/helpers'', if it is possbile, what should I do? Thanks you very much!!!! Saiho __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
2005 Nov 02
1
Windows, Segmentation Faults, config.load_paths and config.cache_classes
...memory leaks using SCGI Rails Runner 0.4.3 from Zed, BUT it has become unusable under Windows (our main development environment) where I am getting a lot of segmentation faults. BUT the problem started under windows with Rails being unable finding the libraries I added into the load path: config.load_paths += %W( #{RAILS_ROOT}/app/services #{RAILS_ROOT}/vendor/feedtools/lib #{RAILS_ROOT}/vendor/uuidtools/lib ) As Rails can''t find these libraries, it generates a "uninitialized constant Blog" wich is the first...
2004 Nov 30
2
$LOAD_PATH patch
Hey all, I dunno if anyone else saw http://rubyforge.org/tracker/index.php?func=detail&aid=1087&group_id=85& atid=413 I just noticed it today (ack!) - I now have a monitor on patches. :) Any thoughts? Dan
2006 Nov 04
3
undefined method `load_paths=' for Dependencies:Module
...ly the same. The migration works fine on my machine. On his machine, we get: Robook:~/dev/laliga/trunk bjclark$ rake db:migrate --trace (in /Users/bjclark/dev/laliga/trunk) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `load_paths='' for Dependencies:Module /Users/bjclark/dev/laliga/trunk/config/../vendor/rails/railties/lib/initializer.rb:134:in `set_autoload_paths'' /Users/bjclark/dev/laliga/trunk/config/../vendor/rails/railties/lib/initializer.rb:83:in `process'' /Users/bjclark/dev/laliga/trunk/con...
2006 Jan 04
2
Using gems from vendor/ ?
Maybe someone here can help me out. I''ve unpacked tzinfo in to my vendor/ directory using "gem unpack tzinfo" and got a vendor/tzinfo-0.1.1 directory as a result. How can I require this gem in my app? I''m trying to use a require line in my environment.rb but no matter what I do Rails seems to look for a locally installed copy in /usr/local/ instead. Any advice?
2011 Feb 24
1
augeas - add to beginning of file
Hi: Using augeas, how do you add a comment to the beginning of a file. I know you can use ins but you need to specify a path to insert before or after. In my case I can''t with 100% certainty say I will no what the first line. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to
2009 May 12
2
rails 2.3.2 is not generating environment.rb properly
...do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) # Specify gems that this application depends on and have them installed with rake gems:install # config.gem "bj" # config.gem "hpricot", :version => ''0.6'', :source => "http://code.whytheluckystiff.net" # c...
2006 Jan 20
2
what''s the right way to require a file?
I''m having a problem importing a class from another project (not a RoR application). What''s the right way to require such a file? I have a class ModelPathwayObject. It''s in #{RAILS_ROOT}/../lib/model_pathway_object.rb , so I add that path to config.load_paths. In config/environment.rb: Rails::Initializer.run do |config| config.load_paths += %W( #{RAILS_ROOT}/../lib ) end I then tried to require the file from config/environment.rb by appending require ''model_pathway_object'' With these changes WEBrick wouldn''t start: [luc...
2006 Dec 06
0
Testing your workers
...unit/market_summary_worker_test.rb:2 ---------------- So, I added couple of more files to the require and: ------------------- require File.dirname(__FILE__) + ''/../test_helper'' BACKGROUNDRB_CODE = File.dirname(__FILE__) + ''/../../vendor/plugins/backgroundrb'' $LOAD_PATH << File.join(BACKGROUNDRB_CODE + ''/lib'') $LOAD_PATH << File.join(BACKGROUNDRB_CODE + ''/server/lib'') $LOAD_PATH << File.join(BACKGROUNDRB_CODE + ''/server/lib/backgroundrb'') require ''backgroundrb_server'' requir...
2011 Jun 01
4
missing these required gems: will_paginate
...e'' # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) # Specify gems that this application depends on and have them installed with rake gems:install # config.gem "bj" # config.gem "hpricot", :version => ''0.6'', :source => "http://code.whytheluckystiff.net" # c...
2009 Feb 09
9
fastercsv, freezing into vendor/gems
I''m using fastercsv such that in my rake file I''m doing this. require ''fastercsv'' It works fine on my Mac. I need to freeze this gem into the app though so my rake tasks work on the production machine. ----------- I spent about two hours though this weekend trying to get this Gem "frozen" into the vendor/gems folder. I tried all sorts, I ... -