Displaying 20 results from an estimated 110 matches similar to: "what''s the right way to require a file?"
2006 Jan 07
2
app no longer runs - MissingSourceFile for any controller
Hello all. I somehow managed to break my rails app running under Apache 2
with fcgi. With any action I try, it throws an exception saying it can''t
find the source file. For instance, requesting an action in my
welcome_controller results in:
MissingSourceFile in <controller not set>#<action not set>
No such file to load -- app/controllers/welcome_controller.rb
The log
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") ]
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/.
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
2011 Mar 28
0
undefined method "load_paths" for ActiveSupport::Dependencies:Module Error
I''m writing a Rails plugin from scratch and recently generating models
inside it.
In fact, i''m trying to follow the guide from http://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 =
2006 Mar 02
1
web serveces problem
Hi,
I''m trying to added layered web services to my application and from some
reason it''s not working for me. i''m working with ruby 1.84, rails 1.0.
here are my files:
1. app/apis/kate_api.rb:
class KateAPI < ActionWebService::API::Base
inflect_names false
api_method :check_version, :expects => [:string], :returns => [:string]
end
2.
2008 Jan 29
4
Setting up release-1.0.1
Hello,
I am unable to get the backgroundrb server to run.
Initially I got:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:263:in
`load_missing_constant'': uninitialized constant
BackgrounDRb::MasterProxy (NameError)
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:in
2005 Nov 02
1
Windows, Segmentation Faults, config.load_paths and config.cache_classes
I am doing some testing with the rails trunk, version I switched to
because of memory leaks in 0.13.1 under linux environment.
Right now the application is running fast and steady under linux, with
no 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
2006 Apr 17
7
Should Perl talk to Rails via LWP
Hi folks,
I need your opinions on a basic design issue.
I''ve seen the light of RoR and have replaced my Perl (DBI/CGI) based web
server <-> RDBMS communication with RoR, but I still have a whole host
of users (other servers/OS''s etc) out there wanting to talk to my
RDBMS and they only talk Perl. Also they don''t want to talk Perl/DBI
directly (they are not allowed
2006 Nov 04
3
undefined method `load_paths=' for Dependencies:Module
I''ve been working on an app, and had a friend check it out to his
machine. I''ve got rails and all my plugins set up with svn:externals,
so when he svn ups it he gets all the latest stuff. I''ve just svn
up''d both machines so we''re running the same versions of everything.
We''re also running the same version of ruby (1.8.4). As far as I can
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
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?
2005 Aug 06
0
Re: Error when going to Fastcgi.
I fixed that missing comma, now I get this error:
Processing Base#index (for 24.94.221.205 at Sat Aug 06 14:40:47 GMT
2005)
Parameters: {}
NoMethodError (undefined method `before_filter'' for #<Object:
0x80859b8>):
/app/controllers/loginadmin_controller.rb:1
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
18:in `require__''
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
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 ...
-
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
2006 Sep 01
2
Include ActiveResource
Hello,
I want to give ActiveResource a spin.
I have all the code checked out from SVN in vendor/rails (yes, including
ActiveResource).
I''m trying to make sure it gets loaded.
I did this in environment.rb:
config.load_paths += %W( #{RAILS_ROOT}/vendor/rails/activeresource/lib )
Unfortunately I still can''t use it. I have an ActiveResource derived model,
Address:
class
2006 Jan 20
6
Sharing a Model
I have two rails applications that modify/view the same data. Is there
a DRY way of sharing a model (not just database) between two separate
applications?
--
Mike
2009 Oct 19
3
routing namespaced controllers
Hi,
I have one controller in the /app/controllers/animals_controller.rb
directory, and another in
/app/controllers/production/services_controller.rb. The thing is that
one Animal has many Services, and i''d like to access to them using
something like:
http://localhost:3000/animals/1/production/services/1
or at least with:
http://localhost:3000/animals/1/services/1
I tried the last one
2006 Jun 26
9
Form Mail
What is the most RoR friendly way of making a form mailer similar to
this php one?
http://tips-scripts.com/?tip=form_mail#tip
Or is it easier just to use the php with RoR?
--
Posted via http://www.ruby-forum.com/.