Displaying 20 results from an estimated 10000 matches similar to: "Validation error handling on related models"
2006 Mar 16
3
inserted_at seems buggy in production mode?
Hi,
I''ve got a table with an inserted_at column. When I insert a record it
automatically injects the current date/time, all is well.
Then when I insert a second record, it uses the exact same timestamp
that is used in the first record.
This behavior only seems to occur in production mode. When I restart the
server, the problem goes away but then immidetatly occurs again on the
2008 Jan 06
8
ActionController::InvalidAuthenticityToken
Ruby noob here.
Just installed Rails 2.0, and am having trouble with updating DB
tables, using the ApplicationController.
My ApplicationController file looks like:
class StoryController < ApplicationController
protect_from_forgery :only =>
[:create, :update, :destroy]
scaffold :story
#def index
#@current_time = Time.now
#@story =
2008 Apr 13
8
Brand new to rails: can't get databases to work
Just starting to learn rails. All is going well, until I tried to hook
up a database.
"undefined method `model'' for ZingerController:Class" is the message I
get from the server.
I imagine I''ve left something out that is keeping me from connecting
to the database, but I''m not exactly sure what.
Your help is appreciated.
bests,
-rsr-
session dump:
2008 Mar 27
3
Help with authentication errors
Hello,
I have been working through two books, "Agile Web Development with
Rails, 2nd Ed." and "Ajax on Rails". I''m using Rails2.0. In both cases,
I run into an authentication error when doing the examples. In AWDwR,
when trying to add new information to the database (p. 68) I get
ActionController::InvalidAuthenticityToken in AdminController#create
2008 Mar 04
2
Why would ActiveRecord connect to Postgres as root?
My databases.yml makes no mention of root and in my dev environment
everything works fine, however following a deployment with Capistrano
about an hour ago, I get the following error:
PGError in HomeController#index
FATAL: role "root" does not exist
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/postgresql_adapter.rb:713:in `connect''
2008 Apr 09
5
intermittent BJ errors
hi all
I''m running background tasks using BJ 1.0.1 (gem version). On some
requests, the tasks are executed as expected. On others, I get the
following error:
RuntimeError (no bj found in ["/u/apps/igniter/releases/20080408205801/
script", "/bin", "/usr/bin", "/sbin", "/usr/sbin"]):
when it runs, it runs fine but does anyone know what
2008 May 05
2
Deploying to a staging server using Capistrano: how to start up BackgrounDRb?
Hi.
I am using BackgrounDRb to process thumbnails and upload to S3 -
things are hunky-dory in development (thumbs are generated, these are
uploaded to S3, the metadata is saved to trhe DB, and I get a nice
status page updated by periodic calls via ask_status), but when I
tried to deploy to our staging server and stop/start BackgrounDRb via
Capistrano, things blew up - well, not exactly,
2008 Nov 12
4
Help! getting a "can't dup NilClass" error and don't know what to do about it.
Thanks for any help you can offer.
I am trying to send out a small batch of emails using an http
request. I know it sounds odd. hear me out.
I have loaded a bunch of emails into this table and just want to
slowly work through them. Sort of a poor mans AR:Mailer. But I am
getting a "can''t dup NilClass" when I hit it with a http request.
**********************************
2009 Jun 08
2
Connecting to SQLServer
New to rails. Installed rails on my XP desktop, and setup my first app
that will use an existing SQLServer database. I am able to connect to
SQLServer using odbc with following code.
require ''rubygems''
require ''ActiveRecord''
ActiveRecord::Base.establish_connection(
:adapter => ''sqlserver'',
:mode => ''odbc'',
:dsn
2009 Jan 09
14
undefined local variable or method `current_user' for
Hi All, I am using a Plugin mdarby-restful_acl with
restful_authentication and I am following the procedure form
http://github.com/mdarby/restful_acl/tree/master , but I am getting some
irritating error "undefined local variable or method `current_user'' for", I
know I am missing something but I dont know what?
Can anybody help me regarding this?
Shahroon
2008 Mar 14
1
Rails App freezes when accessed
Hi All,
I just had this problem come up today and so far I''m stumped. This
morning, my mongrels were all completely unresponsive. I had to kill
-9 them to get them to go away. I restarted them, but the first time
that they were accessed they froze again. Nothing gets printed to the
logs. I tried starting a single mongrel and accessing it directly.
If I hit CTRL-C before accessing
2008 Feb 15
3
Ajax problem with rails 2.0.2 - frozen string?
I am deploying a new rails application on a shared host (hostingrails)
for the first time. My local app works great. However, Ajax requests
in the deployed application are generating the following error:
/!\ FAILSAFE /!\ Fri Feb 15 08:44:59 -0600 2008
Status: 500 Internal Server Error
can''t modify frozen string
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
2008 Jun 21
5
RJS can't modify frozen string
Any ideas why RJS would start causing "can''t modify frozen string"
errors? This was working last night and I''m not sure what could have
been changed to cause this. The app is on a VPS not shared hosting.
/!\ FAILSAFE /!\ Fri Jun 20 20:13:37 -0700 2008
Status: 500 Internal Server Error
can''t modify frozen string
2009 Jun 22
1
getting error can't modify frozen hash
Hi,
When I upgraded my rails application to rails 2.3.2 I am getting
error ''can''t modify frozen hash'' on using
@something.update_attribute(params[:something]).
Can anyone help me who is familiarize with this bug?
Thanks,
2007 Aug 19
3
fastcgi issue on production
I just deployed my rails app to my production server. It''s all working
locally, but when I switched it over to the production server (at
dreamhost) I get this error:
# Logfile created on Sun Aug 19 15:22:48 -0700 2007 by logger.rb/
1.5.2.9
[19/Aug/2007:15:22:48 :: 1841] starting
[19/Aug/2007:15:22:48 :: 1841] Dispatcher failed to catch: You have a
nil object when you didn''t
2007 Oct 08
1
Rails reverses apostrophes
Hi,
I am quite new to Ruby on Rails so this might have a very simple
answer... My problem gives the following error message when I try to
call the count function for an item.
Mysql::Error: Unknown column ''TournamentTemplate'' in ''where clause'':
SELECT count(*) AS count_all FROM action_logs WHERE
(action_logs.loggable_id = 1 AND action_logs.loggable_type =
2009 Apr 22
3
Error on running any controller- Noob question
Hi ,
I am running on Vista with webrick ...
When I generate controllers , models and views I get an error as
under.
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
dependencies.rb:105:in `const_missing''
C:/ROR_lpapp042109/app/controllers/afflnetworks_controller.rb:5:in
`index''
I tried reinstalling but kept stumbling on this.
gem -v
1.3.2
rails -v
2.3.2
2006 Apr 03
2
no marshal_dump is defined for class Proc
Hello ~
This problem has me puzzled. When users login to my rails app I have the
session set up to be stored in the MySQL database for the app.
Intermittently, users will get the following error:
no marshal_dump is defined for class Proc
D:/apps/xampp/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.0/lib/action_controller/session/active_record_store.rb:81:in
`dump''
2006 Jan 04
3
Intermittent problem with link_to_remote()
Hi folks,
My page displays links for ''categories'' using the link_to_remote()
function. Clicking on one of these links goes to the controller and
returns any child categories. I''m finding that the page works ok but
after a number of clicks (average 5 or so), it crashes with an error:
==============================================
Processing Base#index (for
2005 Feb 13
6
Apache config help needed
Hi all,
I''m (STILL) plugging away trying to get rails to work under Apache2
Rails 0.9.5 Apache 2, OS Mandrake Linux 10.1
Apache is already running other stuff on /pluto/ and /localhost/ so I wish
to install a new virtual host for rails to avoid upsetting anything.
Added rails to my hosts file, and edited conf/Vhosts.conf to contain
NameVirtualHost 192.168.0.254
<VirtualHost