private method 'gsub' called during Page.create

47 views
Skip to first unread message

daudi

unread,
Jun 7, 2011, 2:10:08 AM6/7/11
to Refinery CMS
Phil,
Been struggling with this all day .. need some help/suggestions. I
normally doing my dev on Ubuntu, but my web designer associate uses
iMAC (Snow Leopard). Today decided to put rvm onto her machine so we
can sanely migrate up Refinery without messing up our current clients
with different gems (was starting to happen already).

Got rvm installed, gemset setup for my refinery projects .. BUT I keep
running into this error during rake db:setup on the local (MAC)
machine.

Loading db/seeds/galleries.rb
rake aborted!
private method `gsub' called for #<Proc:0x105215790>

when I go into console, same occurs when I try to do Page.create.

This error does NOT occur on exactly same refinery code on my Ubuntu
machine (which already has had rvm on it with gemsets). I'm using same
Gemfile on both.

Is this a permissions error somewhere? Is it a missing gem? which
could it be?
Sorry to trouble you ...

here's the backtrace:

/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/base.rb:1738:in `interpolate_sql'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations/association_proxy.rb:
165:in `send'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations/association_proxy.rb:
165:in `interpolate_sql'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations/association_proxy.rb:
105:in `conditions'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations/
has_one_association.rb:102:in `construct_sql'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations/
has_one_association.rb:7:in `initialize'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations.rb:1450:in `new'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/associations.rb:1450:in `slug'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
friendly_id_globalize3-3.2.1.3/lib/friendly_id/slugged.rb:75:in
`slug?'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
friendly_id_globalize3-3.2.1.3/lib/friendly_id/slugged.rb:100:in
`new_slug_needed?'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
friendly_id_globalize3-3.2.1.3/lib/friendly_id/active_record_adapter/
slugged_model.rb:57:in `build_a_slug'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/callbacks.rb:424:in
`_run_save_callbacks'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/callbacks.rb:277:in
`create_or_update'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/persistence.rb:39:in `save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/validations.rb:43:in `save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/attribute_methods/dirty.rb:21:in
`save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:237:in `save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:289:in
`with_transaction_returning_status'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/connection_adapters/abstract/
database_statements.rb:139:in `transaction'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:204:in
`transaction'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:287:in
`with_transaction_returning_status'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:237:in `save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:248:in
`rollback_active_record_state!'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/transactions.rb:236:in `save'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/base.rb:498:in `create'
/Users/Alexis/code/Alexis/public/gardenia/db/seeds/galleries.rb:8
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:596:in
`new_constants_in'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/code/Alexis/public/gardenia/db/seeds.rb:11
/Users/Alexis/code/Alexis/public/gardenia/db/seeds.rb:9:in `each'
/Users/Alexis/code/Alexis/public/gardenia/db/seeds.rb:9
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:596:in
`new_constants_in'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/
activerecord-3.0.3/lib/active_record/railties/databases.rake:281
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:205:in `call'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:205:in `execute'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:200:in `each'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:200:in `execute'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:158:in `invoke_with_call_chain'
/Users/Alexis/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/monitor.rb:
242:in `synchronize'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:151:in `invoke_with_call_chain'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:176:in `invoke_prerequisites'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:174:in `each'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:174:in `invoke_prerequisites'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:157:in `invoke_with_call_chain'
/Users/Alexis/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/monitor.rb:
242:in `synchronize'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:151:in `invoke_with_call_chain'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/task.rb:144:in `invoke'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:112:in `invoke_task'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:90:in `top_level'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:90:in `each'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:90:in `top_level'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:129:in `standard_exception_handling'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:84:in `top_level'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:62:in `run'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:129:in `standard_exception_handling'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/lib/
rake/application.rb:59:in `run'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/gems/rake-0.9.1/bin/
rake:32
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/bin/rake:19:in `load'
/Users/Alexis/.rvm/gems/ruby-1.8.7-p334@gardenia/bin/rake:19
Tasks: TOP => db:setup => db:seed

Philip Arndt

unread,
Jun 8, 2011, 12:44:21 AM6/8/11
to refine...@googlegroups.com
Are you running ruby 1.8.7 on both machines? Ruby 1.9.2 is much nicer :-)
Also of note is that you're using Rails 3.0.3 - could a more recent version help? I can guess based on that that you're also not using the latest version of Refinery which is 1.0.0..

Phil

Daudi Amani

unread,
Jun 8, 2011, 12:58:31 AM6/8/11
to refine...@googlegroups.com
Yes, 1.8.7 on both machines
Gemfile on both calls for Rails 3.0.3 .. but I just noticed that my gem list for Refinery on Ubuntu also has 3.0.4 on it .. hmmmm. Rake on both is 0.9.1.
Also, Ubuntu-side has celerity and culerity .. butit's not called for in Gemfile .. not sure if related or not.

Yeah, I'm still on 0.9.9.9 on both machines. We have about 17 client sites based on Refinery .. So I plan to migrate them to 1.0 Real Soon Now AFTER I get her MAC with RVM ready.

My experience is with Ubuntu, not MAC's peculiarities... very annoying.
--
You received this message because you are subscribed to the Google
Groups "Refinery CMS" group.
To post to this group, send email to refine...@googlegroups.com
To unsubscribe from this group, send email to
refinery-cms...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/refinery-cms?hl=en
 
http://www.refinerycms.com

Daudi Amani

unread,
Jun 8, 2011, 1:50:58 AM6/8/11
to refine...@googlegroups.com
OK here's the ISSUE and the solution.  It has to do with gem friendly_id_globalize3
It cannot be at version 3.2.1.3 for (I'm assuming) Refinery 0.9.9.9. In Gemfile, I freeze at v 3.2.1, and the the error gsub doesn't occur. Hurray. progress. It seems that it is NOT a MAC issue after all.


On Wed, 2011-06-08 at 16:44 +1200, Philip Arndt wrote:
--
Reply all
Reply to author
Forward
0 new messages