Displaying 20 results from an estimated 1000 matches similar to: "Ruby on Rails 3 RC and files in "lib" directory"
2012 Feb 27
9
Bit of a issue with creating a new app and running it
HI all,
I have just setup the ROR environment on a vps, but once i created the
app and run rails s or db:create after modifying the database.yml it
keeps on appearing with the "Could not find gem sqlite3" etc message
which i know this as it''s not install as i am using mysql. What else
have i got to do other than modifying the database.yml as to me it''s
still looking
2009 Sep 04
3
libxml-ruby: How to handle XML::Parser::ParseError?
Code:
require "rubygems"
require "xml"
class TaskLoader
class BadXML < RuntimeError
end
def load_tasks
doc = XML::Parser.file( "qq.xml" ).parse
# ... work with document ...
rescue XML::Parser::ParseError, BadXML # this is line #40
# ...
end
end # TaskLoader
p TaskLoader.new.load_tasks # this is line #71
Output:
read_xml.rb:40:in
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
Hi,
I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and
I''m having problems loading a yaml file. I have a load_config.rb in
the initializers folder which loads a yaml file. The basic loading
code is:
FACEBOOK_CONFIG = YAML.load_file(File.join(Rails.root, ''config'',
''facebooker.yml''))[RAILS_ENV]
This stopped working when I moved to
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
2006 Mar 27
2
dispatch.fcgi hanging after lighttpd shutdown
Hi.
I''m using RoR 1.0 with FastCGI and lighttpd on a Debian 3.1 box. I
have configured lighttpd to do adaptive spawning of the FastCGI
processes.
However, after shutting down lighttpd the FastCGI processes remain
running.
Did this problem occur to anyone of you? Is there a fix?
I''d be really grateful for every answer.
Regards,
Manuel Holtgrewe
2011 Feb 04
6
A plugin inside an engine
In Rails 3, is it possible to have a plugin inside an engine?
Adding the lib dir of the plugin to autoload_paths doesn''t seem to
work.
I can manage to load it by adding that path to $: and requiring the
init.rb file, but I''m not sure that''s the correct approach.
Thanks!
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2006 Aug 10
6
Migrations suddenly broken: undefined method autoload_paths
I really need some help here because I am at a loss. I have been using
migrations just fine now for a while and I suddenly started getting a
very bizarre error when migrations are run:
undefined method `autoload_paths='' for Dependencies:Module
I have tried rolling back my application code, and rolling back the
rails edge revision I am running but neither seem to help.
I have
2012 Jul 12
1
engines: accessing classes from the hosting-apps lib
I have an engine and can access model-classes of the hosting app without
any troubles.
But when I try to access classes that are defined in the lib-directory of
the hosting app, they are not found and I get a
uninitialized constant Redmine
where Redmine is a module defined in the lib-directory of the hosting app.
The lib-directory has added this dir to the autoload_paths, but the engine
2010 Jul 05
1
[PATCH] gettext initiation problem Thanks to Thibault Deloffre <tdeloffre@linagora.com>
From: root <root at ovirt.admin.virt.par.lng>
Signed-off-by: root <root at ovirt.admin.virt.par.lng>
---
src/app/controllers/application_controller.rb | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 4c4666e..c7f8431 100644
---
2009 Sep 10
1
undefined method `protect_against_forgery?'
When I use plugin ''railstree'' (http://www.hashcode.eti.br/?p=91) as
following code:
node = Node.new :label => menu_item.name,
:link_to_remote => {
:base => self,
:update =>
"container",
:url => {
2008 Feb 22
7
Testing misc methods in ApplicationController
I''m already successfully testing before_filters in application_controller
courtesy of this blog post:
http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller
However, i can;''t work out how to test the sort of method that is added to
application_controller so that all controllers can use it. It must be
something simple that i''m doing
2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
src/app/controllers/application_controller.rb | 2 +-
src/config/environment.rb | 2 +-
src/config/initializers/new_rails_defaults.rb | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
2010 Feb 09
4
Rails3 pre and protect_from_forgery
I''ve almost entirely converted a rails 2.3.5 app to 3pre. I''m having
some trouble with protect_from_forgery. I had protect_from_forgery set
in application_controller.rb, but run some uploadify ajax stuff in one
of my controllers, where I had protect_from_forgery, :except
=> :add_file set.
In rails 3 I''m getting ActionController::InvalidAuthenticityToken on
the ajax
2012 Apr 07
3
Is require_dependency supposed to be a public API?
If so, shouldn''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
2009 Oct 18
4
NoMethodError in User sessionsController#new
I''m setting up authentication with Authlogic and I get this error.
I''ve done some searching but with no success. I tried setting the
current_user method in Application_controller to protected and not
private, on the recommendation in Stack Overflow.
Error in browser-----------------
NoMethodError in User sessionsController#new
undefined method `require_no_user'' for
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking
which banner is displayed via different controllers but initially I''d
just like to set a single banner application wide and display it in my
"_header", a partial I include in all layouts.
I''ve got a BannerAdvert model, simple. If I''m in my welcome controller
index action
2007 Dec 03
2
before_filter application => exclude some other controllers
Hello again,
It''s possible to use before_filter in the application_controller, and
exclude for some methods from other controllers ?
i have a before_filter in application_controller that checks if the user
is logged, if the time hasn''t expired, ... and I want to exclude some
methods of this check, like the login. This ''login'' belongs to other
controller.
I
2006 Jul 23
4
Anything like with_scope for ActionController?
There are areas of my application that "want" to use a url structure
like
domain/<human_readable_param>/<Module>/<Controller>/<Action>/<Id>
Please note that the human readable parameter I need to inject is NOT
related to the <id> being used by the action/controller pair. It''s
identifying a container object whose contains are operated
2006 Feb 21
4
Models, Helpers, Modules, etc.
Hello,
I am learning rails and ruby and I have some questions about how should I go
about doing certain things.
[1]Many of my models have some functionality which is common, and instead of
duplicating it across models, I want to store it in a single file, and then
import the file into the models. Should I do this using modules, and then store
them in the `lib'' directory? What is the
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