similar to: Specifying Which Environment I Am In

Displaying 20 results from an estimated 3000 matches similar to: "Specifying Which Environment I Am In"

2005 Mar 11
4
actionmailer settings
A couple questions: 1) How does rails no if you are in your test, dev or production environment? 2) Does anyone have an actionMailer server settings that will work on your standard local machine? I will use the one provided for my textdrive account but for testing on my machine I am getting connection refused. Thanks. Your Friend, Jonathan Kopanas http://www.kopanas.com
2005 Mar 10
4
:anchor won''t work in 0.10.1
Anyone else having problems with :anchor? Until 0.10.0 it was working fine but with this recent update it''s just not doing anything. Thanks, Pedro
2005 Mar 01
2
@request cycle variables
I posted something about this yesterday, and got some good responses but it seems that the variable @request[''controller''] isn''t being passed in to the page or isn''t being read. Has the naming convention for these variables changed. it worked great in all rails versions up to 0.9.5 with fcgi, but is not working in rails 0.10.0 with fcgi. I am currently just
2005 Mar 09
10
Confused about extending the login generator ''user''
I''ve been using the login generator ''out of the box'' for simple authentication, and its been working fine. Now I want to extend it by simply adding ''type_id'' field which links to my ''user_types'' table, but I''m hitting: #<ActionController::SessionRestoreError: Session contained objects where the class definition
2006 Feb 01
3
apache2 / fcgi / RoR - no connection
Hi, I''ve generated a new Rails app and dummy controller "foo" with method "hello". I am trying to run it under Apache/2.0.53 with fastcgi, and getting the index.html page when I hit http://localhost/foo/hello, or for any other request (http://localhost/kdjfslkfjs). Also, there is nothing in the rails logs, and no errors in the apache logs. Relevant bit of
2005 Apr 24
4
Typo 2.0
I''m proud to announce the 2.0 release of the typo web logging engine. What started as a toy project while I was waiting for a client at starbucks now became a prestige open source project with tons of modern features a dedicated dev team and even its own hosting service! Get it at http://rubyforge.org/projects/typo/ The 2.0 release has been long coming. Here are some of the new
2005 Mar 10
5
dispatch.fcgi dieing randomly
Recently my application has refused to start on my production environment. The setup is debian(unstable)/apache2/fastcgi/mysql Rails 0.10 (upgrading to 0.10.1 as we speak) When I first start up apache the machine grinds to a crawl starting up the dispatch.cfi processes. It''s a VPS with 256M of ram, but still (in addition to user time) it''s spending 30% of time in system
2005 Jun 30
4
A Memoir on FastCGI and Apache
With the release of our filmfury.com project, I''ve been trying to rise to the stature of a true system administrator in the last couple of days (haha). I''m trying to understand how all of the pieces to this apache/fastcgi deployment fit together. Here''s what I''ve learned so far: * You need a separate FastCGI server for each Rails application on your
2005 Mar 06
9
How to do SQL queries outside of AR
Hi Everyone, I''m trying to figure out how to do SQL queries in the Controller. I know this is not recommended, but I can''t use ActiveRecord because I am dealing with thousands of a different tables, one for each user, and I don''t think AR can be made to handle that situation. You can assign the table name; but that''s a class variable so any particular
2005 Mar 10
7
Order of Processing
It seems odd to me that the layout is processesed after the view. When I set a variable inside the view it does not have an impact on the layout file. But when I set it in the controller it does. Is this the way it works or is it possible that I am doing something wrong?
2005 Mar 09
1
Re: Tons of shiny new stuff (Tobias Luetke)
Tobias, I would have left a comment on your blog, a thanks really, except that the comment submit form is throwing an error. So, thanks for the cool tools, especially the login generator. After deleting the old generator the new one worked and passed all tests in a snap. Like Tim Lucas said, the Hieraki code base is a wonderful resource for someone learning Rails. Much appreciated.
2005 Mar 05
3
login generator problem
I am trying to use the login generator, but I keep getting the following error when I run "generate login Account": /usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/rails_generator/base.rb:84:in `manifest'': No manifest for ''login'' generator. (NotImplementedError) from (eval):3:in `__send__'' from (eval):3:in `manifest'' from
2005 May 17
8
acts_as_tree elegant tree printing
Hi, I''m working with acts_as_tree to print an unordered list of items: Root -- Child ---- Child I''ve got this working, however I''d like to know if there is a more elegant fashion that I''m unaware of: #Takes a parent category and recursivley returns all children def find_all_subcategories(category) if category.children.size > 0
2005 May 03
8
SQLite3 + RAM drive => 3 times faster unit tests
One problem I sort of always had with the ActiveRecord''s tight coupling to the SQL backend is how slow it makes the unit tests. OK, there are some ways to make it faster at a price of extra complexity (reusing the fixtures, doing a rollback in the end of the test, etc), but still - it is much slower than what I would like a unit test to be. Today I had a very simple idea (why, oh why
2005 Mar 08
3
Chapter Numbering in Hieraki
I''m using Hieraki to do some documentation for RubyGems. So far I''m lovin'' it. But I have a question. I currently have three books on the site. It seems that the chapter numbers continue from one book to the next. For example, the first book has 7 chapters (numbered 1-7). The second book has three chapters, but they are numbered (8-10) rather than the (1-3) I
2006 Jan 11
3
Idle Apache+FastCGI sleeping?
Wondering: Does Apache shut down inactive FastCGI processes if it doesn''t get any requests for a while? My app works fine if it''s being used regularly, but it will respond very slowly to the first request after an hour of zero traffic. Is there a way to keep FastCGI ready all the time, even when there haven''t been any requests for a while? We''re deploying
2005 Feb 06
5
Rails on FreeBSD or OSX
Hello everyone- I was just reading the article on Rails at O''Reilly and one of those little light bulbs over my head went off - what a GREAT tool. I tried to install both Ruby on my Mac PowerBook without much luck and then tried to install Ruby and Rails on a FreeBSD server I have. I am running into some odd errors - so, my question is - can you point me to some tech resources
2005 Mar 25
2
Rails PDF Documentation
hi, i''m falling in love with rails, but the main obstacle is digesting the huge amount of documetation for it... i''m getting dizzy flipping back and forth between my development and the online reference. i know rails is in a constant state of flux, but surely there is a pdf-ized version of the api reference out there somewhere. alas, google tells me there is no such animal.
2005 Mar 14
1
(newbie) /tmp/fcgi_ipc ?
I am running Rails on my Mac, installed from fink/gems. I get this error when I try to re/start Apache: FastCgiIpcDir /tmp/fcgi_ipc: access for server (uid -1, gid -1) failed: read not allowed If I chmod the /tmp/fcgi_ipc directory, apache starts and everything''s fine. Why is fcgi_ipc in my /tmp directory? Can anyone guess why the chmod''ing doesn''t seem to
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails? Simple example: factorial modulus a large number input: integer x output: factorial( x ) % 12345678901234567 I want it so that if it computes factorial of N once, it will not have to compute for N again. code: class SiteController < ApplicationController caches_action :factorial, :inv def examine @inv = @params[''inv''] @outv =