Displaying 20 results from an estimated 100 matches similar to: "Problem with Rails3.1.1 in mass_assignment_authorizer"
2014 Feb 17
0
Need help -FATAL: database "catarse_development" does not exist
Hi
i try to run this
rake db:migrate
How i fix this
i get this
[root@localhost catarse]# rake db:migrate
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
`block in require': iconv will be deprecated in the future, use
String#encode instead.
You no longer need to have jasmine.rake in your project, as
it is now automatically
2011 Sep 25
2
Noob Rails patcher - problems running the sqlite3 tests...
Hi,
I am following the guide here:
http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html
I have an ubuntu 11.04 VM setup, installed rvm, and ruby (ruby 1.8.7
(2011-06-30 patchlevel 352) [x86_64-linux]).
Pulled down the rails from github and created a 3.0 branch:
$ git branch --track 3-0-stable origin/3-0-stable
$ git checkout 3-0-stable
I can run the non-db tests ok, all pass
2011 Jul 14
0
ruby-1.8.7 + mysql-5.1.58 = Mysql::Error: #08S01Bad handshake
The issue:
ruby-1.8.7 (compiled from src, not rpm) can''t connect to mysql-5.1.58:
"Mysql::Error: #08S01Bad handshake"
Environment:
Linux Fedora Core 12 (or 14, does not matter)
remote database server (different host) mysql-5.1.58
Ruby 1.8.7:
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p352.tar.gz
tar -xzvf ruby-1.8.7-p352.tar.gz
cd ruby-1.8.7-p352
./configure
2011 Nov 22
7
rake aborted with ruby on rails
when i run * rake db:create*
*
*
WARNING: ''require ''rake/rdoctask'''' is deprecated. Please use ''require
''rdoc/task'' (in RDoc 2.4.2+)'' instead.
at
/home/vishnu/.rvm/gems/ruby-1.8.7-p352-D9TI4Ms3gBgeRYYz77F+sQ@public.gmane.org/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
DEPRECATION WARNING: Rake tasks in
2012 Sep 18
2
undefined method `to_sym' for nil:NilClass
Hi all,
I am trying to upgrade my rails 2 app to 3 and am getting this error
when trying to login:
NoMethodError in AuthenticateController#authenticate
undefined method `to_sym'' for nil:NilClass
The stack trace is:
activerecord (3.2.2) lib/active_record/validations/uniqueness.rb:26:in
`validate_each''
activemodel (3.2.2) lib/active_model/validator.rb:153:in
2013 Oct 23
0
Error: allocator undefined for Proc
I had this problem all of a sudden, just changed some puppet classes in my
modules, but no particular stuff or no error in the catalog creation.
Env :
Puppet master version 3.2.0-rc1
Centos kernel 2.6.32-279.11.1.el6.x86_64
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Info: Caching catalog for jbossvdbmaster.prod.italy.cloudlabcsi.eu
Debug: Searched for resources in 0.01 seconds
Debug:
2011 Feb 03
5
Ignore attr_accessible in seed file
Is there a way to tell Rails to ignore attr_accessible when seeding the
database and to allow mass assignment with create or new?
I know how to skip validations but do not find anything on mass
assignment...
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2011 Jan 06
4
Not able to insert value in rails console
I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2
Using activerecord-sqlserver-adapter (3.0.5)
windows with sqlserver database
when i create user details in rails console, i am getting below error,
>User.create(:login=>''test'',:password=>''test123'',:password_confirmation=>''test123'')
2012 Apr 13
0
Scoped attr_accessible not working?
Please refer to the ActiveModel MassAssignmentSecurity api<http://api.rubyonrails.org/classes/ActiveModel/MassAssignmentSecurity/ClassMethods.html>for this.
I''m on Rails3.2.3/Ruby1.9.3 and trying to use that technique in the
controller as described. It is supposed to dynamically restrict the
attributes that can be mass assigned. However, sanitize_for_mass_assignment
is ignoring
2012 Feb 27
0
Rails 3.1 and SQLite3
I am getting this message when running my tests against RoR-3.1
.rvm/gems/ruby-1.8.7-p352/gems/activerecord-3.1.1/lib/active_record/
connection_adapters/abstract/connection_specification.rb:71:in
`establish_connection'': Please install the sqlite3 adapter: `gem
install activerecord-sqlite3-adapter` (sqlite3 is not part of the
bundle. Add it to Gemfile.)
However, I already have this in my
2011 Feb 05
3
ActiveModel::AttributeMethods limiting
In my attempt to add AM:Dirty to my model I realized that
AM#AttributeMethods is a bit imperfect. It''s impossible to generate
attribute methods step-by-step in DataMapper-like manner.
class Model
include ActiveModel::Dirty
def self.property(name, klass = String)
define_property_accessors(name, klass)
# This method will be called once, because of
2012 Sep 25
3
Proposal for a new ActiveModel::Errors structure
There are few issues with the current ActiveModel::Errors class.
Firstly, when an error is added to ActiveModel::Errors class via #add
method
(https://github.com/rails/rails/blob/master/activemodel/lib/active_model/errors.rb#L294)
its translation is added. It should not be translated when being added, but
only when being read.
The second issue is a bit bigger. We''d like to create
2006 Jul 05
2
Serialized object behaves weird
Hi!
I got a class named EinsatzFilter which I serialized to session. Before
saving to session it works afterwards I keep getting the message:
"undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from
ActiveRecord::Base inherited class.
Code:
class EinsatzFilter
include ApplicationHelper
attr_reader :personen, :monat, :projekte, :kunde
2012 Aug 05
0
ActiveRecord::Validator vs ActiveModel::Validator
I know that there is an ActiveModel Validator class
https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validator.rb
which is used for the class level validation macros.
But I didn''t find a an ActiveRecord Validator class.
From my understanding in Rails 3, validations have been moved into
ActiveModel to leave ActiveRecord as an ORM.
So now I see this Rails 3 code
2011 May 02
0
Change from 3.0.6 => Rails 3.0.7 "no such file to load -- action_mailer/railtie"
In my application.rb, I have this:
#require "rails/all"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "active_model/railtie"
(I didn''t want ActiveRecord) This worked fine up to 3.0.6, but now fails
with:
/Users/jeffdeville/Documents/code/ruby/wg/config/application.rb:6:in
2011 Jan 02
0
"Confirmation" succeeds when the *_confirmation attribute was neglected from the Model.
<pre>
models/user.rb:
# Oops! I forgot to add the :password_confirmation attribute!
class User < ActiveRecord::Base
attr_accessor :password
attr_accessible :password #, :password_confirmation
validates(:password,
:confirmation => true,
:presence => true)
end
activemodel/lib/active_model/validations/confirmation.rb:
3 # == Active Model
2011 Feb 09
0
Weird error after upgrading to rails 3.0.4
Hey folks,
have you seen this ever?
[user@i ~/rails_project]$ rake rails:update --trace
(in /usr/home/rails_project)
rake aborted!
uninitialized constant ActiveModel::Validations::HelperMethods
/usr/local/lib/ruby/gems/1.8/gems/activemodel-3.0.4/lib/active_model/
validations.rb:50
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.4/lib/
active_support/concern.rb:52:in `class_eval''
2010 Jul 28
3
Rails 3.0.0.rc // rails locales prevent app boot
Hi all,
I got the following error message when booting up my app (which works
fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc;
activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in
`stat'': can''t convert Array into String (TypeError)
When I put some debug code on that line I see the follwing array being
passed;
2010 Aug 22
7
Rails 3: Error saving an object with no useful information
Hey,
I''m kinda desperate cause I''m getting an error and have no idea how to
fix this since it doesn''t give me any information hinting where the
problem is:
irb(main):054:0> reload!;User.last.save!
Reloading...
NameError: undefined local variable or method `to_ary'' for
#<User:0x4ed5d20>
from
2008 Jul 10
0
User.protected_attributes returning empty Set instead of nil -- causing activerecord/lib/base:2307 to raise
I have a model that uses attr_accessible, and in my tests I get this:
RuntimeError (Declare either attr_protected or attr_accessible for
User, but not both.):
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:2307:in `remove_attributes_protected_from_mass_assignment''
/var/lib/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:2114:in