similar to: RAILS_ROOT

Displaying 20 results from an estimated 200000 matches similar to: "RAILS_ROOT"

2006 Apr 30
1
storing sessions in RAILS_ROOT/tmp
I''ve read that the newest versions of rails stores sessions in rails_root/tmp. I''ve been running off the trunk for about 3 months, but I still have all of my sessions stored in /tmp of the file system. What do I need to do to modify it so that my sessions are stored in my rails_root/tmp folder? -- Posted via http://www.ruby-forum.com/.
2009 Sep 09
0
Getting started with Rake - how do I copy a directory of assets to RAILS_ROOT + "/public"
I am just getting started with Rake. I am trying to create a rake task from within a rails plugin to copy some asset files (inside /assets in my plugin folder) to my rails application /public folder. How can I achieve this? I am not sure whether to use FileUtils or File. Where AM I in rake terms. No matter what I do it keeps saying it can''t find the file. Do I need to use File.join or is
2006 Apr 13
1
Setting CWD to be RAILS_ROOT for fastcgi/Apache
All, So I''ve discovered that when running on FastCGI with Apache and the working directory for the process is actually the "public" directory under RAILS_ROOT. Is there a way to force the current working directory to be RAILS_ROOT for the FastCGI procs so that file manipulation would then be done relative to RAILS_ROOT? Or should I just make sure that all of my paths are
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
Hi all, I''m running into a very strange but incredibly annoying problem that I just can''t seem to solve. The exception is occurring from a seemingly innocuous line in my code, a simple ''logger.warn("some debug information")''. The backtrace follows: SecurityError (Insecure: can''t modify array)
2006 Feb 20
3
RAILS_ROOT
I just replied to someone about using send_file and while I was testing my solution I figured out that the controllers "current working dir" appears to be the root of the app. Then I saw a reply that Ezra sent to someone where he used RAILS_ROOT and I thought "duh, I''ve seen that before... shoulda used that". But, when I had an action print out RAILS_ROOT
2006 Jun 15
8
rails saves it to the database and I don''t want to
Hello: I am developing a web application to book machines for an event. so I have an event model class Event < ActiveRecord::Base has_many :datetimes ... end and a datetime model class Datetime < ActiveRecord::Base belongs_to :event ... end I have developed a view with the event information and information for the datetimes. and in the event_controller when I capture a datetime I
2007 Jul 26
1
autotest loosing RAILS_ROOT Constant?
I am having a weird error that I have not had before... I''m bouncing it off the list to see if anyone else has had it, or to give me some pointers about how to find it. Basically, AUTOTEST will run (RSpec mode), fine, then suddenly, will complain that RAILS_ROOT is undefined. Then I stop and restart it, with no code change... no problem. It happens on different specs where I use
2006 Feb 15
0
MySql adapter error
Most likely due to something I misconfigured and/or broke when trying to get the new polymorphic acts_as_taggable to work...In short, after installing that gem and then trying to run gem install mysql on my windows server, I''ve been getting this weird error on every page I try to hit. If anyone give give me any insight into how I messed this up or how to fix, it would be much
2006 Mar 25
3
RAILS_ROOT Help Required!
Hi, I am new over here and also a newbie for Ruby on Rails. I am working on a simple webapp for my band work. I have created a upload controller/model and database which allows to save my files in the directory at /public/dump/. Uploading works but I can''t retrieve it. I have tried several ways. The model uses DUMP_PATH = RAILS_ROOT + "/public/dump" to save the file. But
2006 May 21
0
Re: log4r and rails
The first question I would ask (partially out of curiosity) is what log4r specific feature are you trying to use? While there are some neat log4r features, the built in logger provides (from my perspective) a good logging framework already probably addresses most logging needs. http://wiki.rubyonrails.com/rails/pages/HowtoConfigureLogging That said, a basic setup to use log4r in rails follows a
2010 Dec 12
1
In Test/Unit Dir.glob is Rails root but to require a file must assume "Rails_root/test/"
I am wondering why this is: In Test/Unit I am iterating a directory so that I can require each of the files in the directory. When I call Dir.glob, the root is the Rails_root, however when I iterate the files I get an error if I use Rails root and must begin the included file''s path from within the test directory. This: integration/helpers/file.rb And not
2006 Oct 09
1
error running 'ruby script/console' => "uninitialized constant RAILS_ROOT" ??
Hi, Anyone suggest why when I try to run the console via ''ruby script/console'' I get the following "uninitialized constant RAILS_ROOT" ?? Error: ================================ V:\Source\testapp>ruby script\console Loading development environment. ./script/../config/../config/environment.rb:3:NameError: uninitialized constant RAILS_ROOT
2006 Apr 26
2
Routing to a static HTML file under RAILS_ROOT
I have a regular plain old static HTML file under my RAILS_ROOT that I would like to serve as itself (without any dynamic anything). How can I write a route to "pass the request through" succesfully. I tried map.connect ''path_to_file'', :controller => nil, :action => nil, :id => nil but that didn''t work. Also, note that I have this route
2006 Feb 17
3
How to get RAILS_ROOT when writing a ruby utility in /lib
Hi, Im writing a small ruby utility which at the moment is in /lib of my rails app. However I don''t get access to var''s like RAILS_ROOT, do I need to add an include to get this (and possibily other) rails functionality? Is /lib the right place for this kind of app, its a single ruby class which I call from the command line. Would a rake file be better for this kind of
2006 Mar 28
0
Why is RAILS_ROOT so roundabout?
Why is RAILS_ROOT ''script/../config/../'', rather than say ''script/..'' or something even simpler? Joe -- Posted via http://www.ruby-forum.com/.
2007 Feb 11
4
Let's make RAILS_ROOT an absolute path on Windows
As this Caboose article [] suggests, I am not the only one who had this problem. RAILS_ROOT is a relative path on Windows, and it can bite you in unexpected ways. I had that problem while working on CruiseControl.rb. There is a trivial patch fixing it (by simply applying File.expand_path to the path before assigning it into the RAILS_ROOT constant): http://dev.rubyonrails.org/ticket/7259 Best
2006 Apr 10
0
Log rotation
Using Logger''s standard log rotation in a production Rails app fails, and I''m looking for the easiest way around the problem. Currently, I''m using this in environment.rb: Logger.new("#{RAILS_ROOT}/log/#{ENV[''RAILS_ENV'']}.log", ''daily'') but sometimes get this showing up in the browser: Shifting failed.
2006 Feb 16
3
rescue_action_in_public question
I''m using the rescue_action_in_public example from the Agile book to handle errors and email serious ones to me. In my application.rb controller: def rescue_action_in_public(exception) logger.error("rescue_action_in_public executed") case exception when ActiveRecord::RecordNotFound, ActionController::RoutingError, ActionController::UnknownAction
2007 Oct 24
4
RAILS_ROOT
Hey, I''m using the attachment_fu plugin to upload images on the file system. To retrieve them I''m using: image = "/home/rajeev/Desktop/logo/logo/public#{icon.public_filename}" which is the same as: "/home/rajeev/Desktop/logo/logo/public/icons/0000/0005/green_nature_on_white.jpg" Have can i do this in a shorter way by using RAILS_ROOT? I have tried this
2006 Jun 28
6
file_column plugin. Storing files outside RAILS_ROOT
I also posted this on Rails Engines forum. Sorry for the double post. I am trying to configure file_column plugin so that it stores the images in a directory completely outside of RAILS_ROOT. I have no problems in storing the files by setting :root_path option. But I can''t get to display these images using ''url_for_file_column''. What I get instead of the image is