Displaying 20 results from an estimated 20000 matches similar to: "Moving to production?"
2005 Mar 06
3
permission error in rake''s clone_structure_to_test
Hello,
When I try to run "rake clone_structure_to_test" on my project, I get
the following errors:
$ rake clone_structure_to_test
(in /home/www/cedscreening)
psql:db/development_structure.sql:8: ERROR: permission denied to set
session authorization
psql:db/development_structure.sql:16: ERROR: permission denied for
schema public
psql:db/development_structure.sql:34: NOTICE: CREATE
2005 Feb 26
2
Any documentation for routes?
I''m having a hard time setting up routes.
So far what I have is that accessing /photos/view/YYYY-MM-DD correctly
accesses the photo stored for that date, but I''d like to be able to
access this as simply "/YYYY-MM-DD"
My first guess of:
map.connect '':year-:month-:day'', :controller => ''photos'', :action =>
2005 Mar 05
1
problems with authentication -- restrict certain actions to certain users
Ok, so at this point I''ve got my app completely written, including the
login generator, and I''ve even got stuff like the layout done up all
nicely so that the login page matches the rest of the site nicely. All
is good.
But there''s one problem: I''m not running a wiki here, I''m running a
personal site. As it is, any schmuck can log in, and anybody
2006 Feb 20
3
Background work
Greetings,
I''ve got a rails app which is basically an admin interface to a xml
dataset. Currently I''ve got rails rigged to call a function to spit the
entire dataset to file with every change. This would actually be ok, its
fairly infrequently updated, but when the dataset grows large the user sits
there waiting for it to dump with no feedback as to whats going on. Oh yes,
2005 Mar 06
3
question about testing
Ok, so now I''m learning about testing. After a few initial hiccups,
I''ve got my tests written nicely and all the assertions are passing.
But I just have one question about doing tests in a loop.
In my setup, I''m using the login generator to protect ''sensitive''
actions, while some actions are public. So I''ve got this line in my
setup method:
2005 Mar 19
2
routing problem 1.8.2/0.10.1/webrick?
I seem to have come to a strange problem getting started on rails. I
had everything working in a virtual machine and then set up a seperate
machine just for rails developement. It now seems something is broken a
little.
ruby 1.8.2, rails 0.10.1, postgres, using webrick:
i created a table "users", then "generate scaffold User"
view localhost/users works fine, shows the
2005 Mar 05
3
routes inconsistency?
Hello,
As a small excercise in learning rails, I''ve been porting a very
simple website from SSI to rails (yep, a bunch of static files that
were previously served with a tiny bit of SSI magic are now served by
a database-backed rails, it''s total overkill, I know). Part of the
reason is that I''m trying to move from apache to lighttpd, and
lighttpd''s SSI for
2005 Mar 10
11
Default Values
Where in the application would you suggest I set default values that are read
for every action and in some cases changed and somecases not.
Basically on some pages I am getting the <title> from the DB and if not I want
to put a default one up.
Any suggestions?
2006 Mar 29
2
Fragment Cache Wackiness
I can''t seem to get the fragment cache to use :file_store. I''d really
appreciate it if someone could point me in the right direction.
Rails 1.1 final, FreeBSD
Observe:
In environment.rb AND production.rb (for good measure, DRY be damned):
ActionController::Base.fragment_cache_store = :file_store,
"/www/apps/localfeeds/directory/tmp/fragmentcache/"
At the console
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?
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
2005 Nov 04
1
expire_fragment outside of a controller
I am trying to figure out a way to call the
expire_fragment outside of a controller. I need to
expire some fragments on a hourly basis. I have a
Thread that every hour that will perform a task. The
expire_fragment is located in the module
ActionController::Caching::Fragments as an instance
method.
Do I need to mixin the model
ActionController::Caching::Fragments into my class?
Or is there
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have:
ActionController::AbstractRequest.relative_url_root = "/foobar"
In my layout, I have:
<%= javascript_include_tag :defaults %>
Question 1:
I am getting an error:
ActionController::RoutingError (no route found to match
"/javascripts/prototype.js" with {:method=>:get}):
When I remove the relative_url_root, everything works great.
2008 Mar 18
9
Mongrel Crashes in Production
I have been getting this error on the production server after rails was
updated to 2.0.2 and moreover this worked perfectly in the development
mode. This crash occurs when no one is using the app for an hour or so.
This is the error that I get in the logs. (nohup.out file). The
production log doesnt show anything unusual. Please help me out guys.
2010 Sep 19
4
Rails 2.3.8 - InvalidAuthenticityToken problem. URGENT!
I used to have Simple Captcha installed, but since I removed it I got
all kinds of problems with login.
Processing UsersController#login (for 188.177.122.179 at 2010-09-19
12:21:09) [POST]
Parameters: {"commit"=>"OK", "authenticity_token"=>"/
Y0aZETCsMhyI3CkrZJK6O2NaLEoi+LRe8ZuDPWU9kc=",
2006 Apr 08
2
trouble expiring cached pages
I''m having a bear of a time getting my cached pages to expire. Maybe
one of you guys can help me out. I''ll show my sweeper and then my log
to show that it "should" be working.
class PragmaticSweeper < ActionController::Caching::Sweeper
observe Comment
def after_save(comment)
expire_page(comment.post_id)
end
private
def expire_page(post_id)
2010 Apr 23
2
Routing a Sinatra application
Hello,
I wish to route a sinatra application in my Rails 3 app. As said by
Yehuda, it should be possible.
http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/
However I see the route isn''t recognized and I get
ActionController::RoutingError problems.
It works well with simple rack apps however (the test in actionpack
with a lambda passes well).
I''ve written a test
2009 Feb 10
2
rescue_from for NoMethodError
Hi everyone,
I was just trying to catch some exceptions in my app,
for "Record Not Found" I used this
in my application.rb file
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
rescue_from ActionController::NoMethodError, :with => :show_error
private
def record_not_found
render :text => "404 Not Found", :status =>
2008 Mar 16
3
undefined method `redirect_to'
Hi all. I''m getting the following error in my app:
undefined method `redirect_to'' for ActionController::Base:Class
I''m using Windows 2000, Rails 2.0.2 and resource_controller (from
James Golick).
My controller:
class CommentsController < ApplicationController
include ResourceController::Controller
belongs_to :post, :article, :photo
create do
2008 Nov 21
1
uninitialized constant ActionController::Caching::Fragments
Hey, i''m trying to use "s3cache" plugin with my app, but after adding it
to my vendor/plugins directory and following the install steps i''m
getting this error after running script/server:
/Users/richardschneeman/Documents/AptanaStudio/slangasaurus/vendor/rails/activesupport/lib/active_support/dependencies.rb:275:in
`load_missing_constant'': uninitialized