rucola_activerecord

0 views
Skip to first unread message

pierreva

unread,
Nov 29, 2007, 6:11:43 AM11/29/07
to Rucola
I'm beginning to play with ActiveRecord plugin :
powerbook-g4-de-pierre-vaudrey:~/Sites/fetch/MyApp pierreva$ ruby
script/generate activerecord_model Test
Can't get Objective-C method signature for selector 'snake:case' of
receiver #<NSCFString "MyApp">
Could help me to understand the message sent by the generator.

Thanks for your help.

Pierre

Eloy Duran

unread,
Nov 29, 2007, 6:18:18 AM11/29/07
to ruc...@googlegroups.com
Hey Pierre,

Could you maybe try the following:
In vendor/plugins/rucola_activerecord/generators/activerecord_model/
activerecord_model_generator.rb
on line 18, change:

@app_name =
Rucola
::InfoPlist
.open
(destination_path('Info.plist')).data['CFBundleExecutable'].snake_case

to:

@app_name =
Rucola
::InfoPlist
.open
(destination_path
('Info.plist')).data['CFBundleExecutable'].to_s.snake_case

And see if that fixes the problem?

Cheers,
Eloy

Chris McGrath

unread,
Nov 29, 2007, 6:19:30 AM11/29/07
to ruc...@googlegroups.com

Hrm... it should be picking that up from Rucola itself. Do you have a
more detailed error message with line numbers?

> Thanks for your help.
>
> Pierre

Cheers,

Chris

pierreva

unread,
Nov 29, 2007, 7:14:18 AM11/29/07
to Rucola


On 29 nov, 12:18, Eloy Duran <eloy.de.en...@gmail.com> wrote:
> Hey Pierre,
>
> Could you maybe try the following:
> In vendor/plugins/rucola_activerecord/generators/activerecord_model/
> activerecord_model_generator.rb
> on line 18, change:
>
> @app_name =
> Rucola
> ::InfoPlist
> .open
> (destination_path('Info.plist')).data['CFBundleExecutable'].snake_case
>
> to:
>
> @app_name =
> Rucola
> ::InfoPlist
> .open
> (destination_path
> ('Info.plist')).data['CFBundleExecutable'].to_s.snake_case
>
> And see if that fixes the problem?
Thanks Eloy, problem fixed.

Pierre

Eloy Duran

unread,
Nov 29, 2007, 7:54:17 AM11/29/07
to ruc...@googlegroups.com
Thanks for the feedback Pierre!

Cheers,
Eloy

On 29 nov 2007, at 13:14, pierreva wrote:

>
>
>
> On 29 nov, 12:18, Eloy Duran <eloy.de.en...@gmail.com> wrote:
>> Hey Pierre,
>>
>> Could you maybe try the following:
>> In vendor/plugins/rucola_activerecord/generators/activerecord_model/
>> activerecord_model_generator.rb
>> on line 18, change:
>>
>> @app_name =
>> Rucola
>> ::InfoPlist
>> .open

pierreva

unread,
Nov 29, 2007, 9:24:33 AM11/29/07
to Rucola


On 29 nov, 13:54, Eloy Duran <eloy.de.en...@gmail.com> wrote:
> Thanks for the feedback Pierre!
>
> Cheers,
> Eloy
I'm currently trying to test migrations, but without success :
class CreateTests < ActiveRecord::Migration
def self.up
create_table :tests do |t|
# t.column :title, :string, :default => 'foo'
column :name, :text
column :price, :float
end
end

def self.down
drop_table :tests
end
end
I've multiple versions of gems installed according different versions
of rails
The activesupport 1.4.2 is there, could you help me to activate it ?

powerbook-g4-de-pierre-vaudrey:~/Sites/fetch/MyApp pierreva$ rake --
trace
(in /Users/pierreva/Sites/fetch/MyApp)
rake aborted!
can't activate activesupport (= 1.4.2), already activated
activesupport-1.4.4]
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:196:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:213:in `each'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:213:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in `new_constants_in'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/Users/pierreva/Sites/fetch/MyApp/vendor/plugins/rucola_activerecord/
init.rb:3
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `each'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:265
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/tasks/main.rake:12
/Users/pierreva/Sites/fetch/MyApp/rakefile:12:in `load'
/Users/pierreva/Sites/fetch/MyApp/rakefile:12
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in `load'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in
`raw_load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1727:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1726:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1710:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/opt/bin/rake:18:in `load'
/opt/bin/rake:18

Thanks for your help

Pierre

Chris McGrath

unread,
Nov 29, 2007, 9:43:32 AM11/29/07
to ruc...@googlegroups.com
Hi Pierre,

I have ActiveSupport 1.4.4 and 1.4.2 installed and I don't run into
this :(

Can you give me some more details on your setup:

What version of OS X
What version of RubyCocoa
What version of ruby
What version of rubygems

Cheers,

Chris

pierreva

unread,
Nov 29, 2007, 3:46:53 PM11/29/07
to Rucola


On 29 nov, 15:43, Chris McGrath <ch...@octopod.info> wrote:
> Hi Pierre,
>
> I have ActiveSupport 1.4.4 and 1.4.2 installed and I don't run into
> this :(
>
> Can you give me some more details on your setup:
>
> What version of OS X
10.4.10
> What version of RubyCocoa
0.13 from source
> What version of ruby
ruby 1.8.5 (2006-08-25) [powerpc-darwin8.10.0]
> What version of rubygems
RubyGemsVersion = '0.9.0'

Chris McGrath

unread,
Nov 30, 2007, 5:11:28 AM11/30/07
to ruc...@googlegroups.com
Hi Pierre

Both your ruby and gems are a bit old. Given the problem is with gem
version differences, I'd suggest upgrading gems first. If that doesn't
work then you may have to consider upgrading your ruby too.

Cheers,

Chris

pierreva

unread,
Nov 30, 2007, 10:38:45 AM11/30/07
to Rucola
I upgraded rubygems to 0.9.5 with the same result
can't activate activesupport (= 1.4.2), already activated
activesupport-1.4.4]
/Users/pierreva/rubycocoa/DBTest/rakefile:12:in `load'
If I uninstall activesupport 1.4.2
RubyGem version error: activesupport(1.4.4 not = 1.4.2)
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:377:in `report_activate_error'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:309:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:335:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `each'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in `new_constants_in'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/Users/pierreva/rubycocoa/DBTest/vendor/plugins/rucola_activerecord/
init.rb:3
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `each'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:265
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/tasks/main.rake:12
/Users/pierreva/rubycocoa/DBTest/rakefile:12:in `load'
/Users/pierreva/rubycocoa/DBTest/rakefile:12
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in `load'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in
`raw_load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1727:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1726:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1710:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/opt/bin/rake:18:in `load'
/opt/bin/rake:18
I'm supprised because activesupport 1.4.4 is needed for rubigen.
Are you sure I need to upgrade ruby to 1.8.6 ?
Thanks Chris for your help !

Pierre

pierreva

unread,
Dec 4, 2007, 5:23:47 PM12/4/07
to Rucola


On 29 nov, 12:19, Chris McGrath <ch...@octopod.info> wrote:
> On 29 Nov 2007, at 11:11, pierreva wrote:

>
> Hrm... it should be picking that up from Rucola itself.
The rubyCocoa Maildemo using ActiveRecord works fine on the same
machine
> more detailed error message with line numbers?
>
MyApp pierreva$ rake --trace
/opt/bin/rake:17:Warning: require_gem is obsolete. Use gem instead.
(in /Users/pierreva/Sites/fetch/MyApp)
rake aborted!
can't activate activesupport (= 1.4.2), already activated
activesupport-1.4.4]
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:317:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:335:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `each'
/opt/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `activate'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in `new_constants_in'
/opt/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:495:in `require'
/Users/pierreva/Sites/fetch/MyApp/vendor/plugins/rucola_activerecord/
init.rb:3
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
81:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `each'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:
79:in `load_plugins'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/initializer.rb:265
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/opt/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/opt/lib/ruby/gems/1.8/gems/rucola-0.0.2/lib/rucola/tasks/main.rake:12
/Users/pierreva/Sites/fetch/MyApp/rakefile:12:in `load'
/Users/pierreva/Sites/fetch/MyApp/rakefile:12
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in `load'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1940:in
`raw_load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1727:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1726:in
`load_rakefile'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1710:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
/opt/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/opt/bin/rake:18:in `load'
/opt/bin/rake:18
Have you a rucola activerecord example available for download ?

Cheers

PIerre

Eloy Duran

unread,
Dec 5, 2007, 2:56:28 AM12/5/07
to ruc...@googlegroups.com
Hey Pierre,

Since it's hard to debug this remotely, could you check out these 2
links which seem to be the same problem as you have?

http://adhearsion.lighthouseapp.com/projects/5871/tickets/14-initializing-adhearsion-with-multiple-activesupport-versions-causes-an-explosion
http://merb.devjavu.com/ticket/301

Hope this helps.

Cheers,
Eloy

Reply all
Reply to author
Forward
0 new messages