Dave Everitt | 18 May 2011 12:44
Picon
Gravatar

update breaks hello clock?

Just did a quick gem update, including Camping 2.1, and ran 'Hello  
Clock' (http://camping.rubyforge.org/book/02_getting_started.html) as  
a quick test:

deveritt$ camping nuts.rb
/usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/utils.rb:138:in  
`union': can't convert Array into String (TypeError)
         from /usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/ 
utils.rb:138
         from /usr/local/lib/ruby/gems/1.8/gems/camping-2.1/bin/../ 
lib/camping.rb:3
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:31:in `gem_original_require'
         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:31:in `require'
         from /usr/local/lib/ruby/gems/1.8/gems/camping-2.1/bin/ 
camping:5
         from /usr/local/bin/camping:19:in `load'
         from /usr/local/bin/camping:19

Any ideas? Worked fine with 2.0.392 -

Camping.goes :Nuts

module Nuts::Controllers
   class Index < R '/'
     def get
        <at> time = Time.now
       render :sundial
     end
(Continue reading)

Magnus Holm | 18 May 2011 14:07
Picon
Gravatar

Re: update breaks hello clock?

Seems like Rack 1.2.2 (and 1.2.1) no longer supports 1.8.6. It's fixed
in Git, but I'm not sure when a new version will be released:
https://github.com/rack/rack/pull/145

You can downgrade to 1.2.0 for now.

// Magnus Holm

On Wed, May 18, 2011 at 12:44, Dave Everitt <deveritt <at> innotts.co.uk> wrote:
> Just did a quick gem update, including Camping 2.1, and ran 'Hello Clock'
> (http://camping.rubyforge.org/book/02_getting_started.html) as a quick test:
>
> deveritt$ camping nuts.rb
> /usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/utils.rb:138:in
> `union': can't convert Array into String (TypeError)
>        from
> /usr/local/lib/ruby/gems/1.8/gems/rack-1.2.2/lib/rack/utils.rb:138
>        from
> /usr/local/lib/ruby/gems/1.8/gems/camping-2.1/bin/../lib/camping.rb:3
>        from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
>        from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
>        from /usr/local/lib/ruby/gems/1.8/gems/camping-2.1/bin/camping:5
>        from /usr/local/bin/camping:19:in `load'
>        from /usr/local/bin/camping:19
>
> Any ideas? Worked fine with 2.0.392 -
>
(Continue reading)

Dave Everitt | 18 May 2011 18:15
Picon
Gravatar

Re: update breaks hello clock?

Thanks Magnus  - downgraded Rack to 1.2.0 after trying Git version.

For the benefit of anyone else reading this:

Tried the 1.8.6 compatibility-fixed version of Rack:
   git clone git://github.com/sferik/rack.git
   cd rack
   rake test
   (in /Users/deveritt/src/rack)
   bacon -I./lib:./test -w -a -q -t '^(?!Rack::Adapter| 
Rack::Session::Memcache|rackup)'
   sh: line 1: bacon: command not found
   rake aborted!
   Command failed with status (127): [bacon -I./lib:./test -w -a -q - 
t '^(?!Rack...]
   /Users/deveritt/src/rack/Rakefile:74

So (no time to dig further into the above, and most recent Rack was  
1.1.0 on machine in question) just did:
   sudo gem install -v 1.2.0 rack
   sudo gem uninstall -v 1.2.2 rack

Everybody's Camping happily again :-)

Dave

> Seems like Rack 1.2.2 (and 1.2.1) no longer supports 1.8.6. It's fixed
> in Git, but I'm not sure when a new version will be released:
> https://github.com/rack/rack/pull/145
>
(Continue reading)

Magnus Holm | 18 May 2011 18:36
Picon
Gravatar

Re: update breaks hello clock?

A better solution is to actually upgrade to 1.8.7 (which is actively maintained)

// Magnus Holm

On Wed, May 18, 2011 at 18:15, Dave Everitt <deveritt <at> innotts.co.uk> wrote:
> Thanks Magnus  - downgraded Rack to 1.2.0 after trying Git version.
>
> For the benefit of anyone else reading this:
>
> Tried the 1.8.6 compatibility-fixed version of Rack:
>  git clone git://github.com/sferik/rack.git
>  cd rack
>  rake test
>  (in /Users/deveritt/src/rack)
>  bacon -I./lib:./test -w -a -q -t
> '^(?!Rack::Adapter|Rack::Session::Memcache|rackup)'
>  sh: line 1: bacon: command not found
>  rake aborted!
>  Command failed with status (127): [bacon -I./lib:./test -w -a -q -t
> '^(?!Rack...]
>  /Users/deveritt/src/rack/Rakefile:74
>
> So (no time to dig further into the above, and most recent Rack was 1.1.0 on
> machine in question) just did:
>  sudo gem install -v 1.2.0 rack
>  sudo gem uninstall -v 1.2.2 rack
>
> Everybody's Camping happily again :-)
>
> Dave
(Continue reading)

Dave Everitt | 18 May 2011 19:41
Picon
Gravatar

Re: update breaks hello clock?

Hmmm... time to upgrade to Leopard - the nice 'one-click Ruby  
installer' at http://rubyosx.rubyforge.org only goes to 1.8.6 on  
Tiger, and there are readline issues when installing 1.8.7 on Tiger.

BTW the link to Camping on the above page still goes to http:// 
code.whytheluckystiff.net/camping/ if anyone knows who to contact to  
get this changed? - Dave

> A better solution is to actually upgrade to 1.8.7 (which is  
> actively maintained)
>
> // Magnus Holm
>
> On Wed, May 18, 2011 at 18:15, Dave Everitt  
> <deveritt@...> wrote:
>> Thanks Magnus  - downgraded Rack to 1.2.0 after trying Git version.
>>
>> For the benefit of anyone else reading this:
>>
>> Tried the 1.8.6 compatibility-fixed version of Rack:
>>  git clone git://github.com/sferik/rack.git
>>  cd rack
>>  rake test
>>  (in /Users/deveritt/src/rack)
>>  bacon -I./lib:./test -w -a -q -t
>> '^(?!Rack::Adapter|Rack::Session::Memcache|rackup)'
>>  sh: line 1: bacon: command not found
>>  rake aborted!
>>  Command failed with status (127): [bacon -I./lib:./test -w -a -q -t
>> '^(?!Rack...]
(Continue reading)

David Susco | 24 May 2011 19:53
Picon

anyone run into this activerecord error before?

Not really Camping specific, but I've always had better luck asking on
this list than any of the rails ones. I'm trying to upgrade from
activerecord 2.3.8 to 3.0.7 and I'm getting a
ActiveRecord::ConnectionNotEstablished error when the
has_and_belongs_to_many association is being used.

A simple example is attached, and the stack follows. Has anyone run
into this before?

!! Error loading /var/www/apps/arg/arg.rb:
ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in
`connection'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/associations.rb:1806:in
`create_has_and_belongs_to_many_reflection'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/associations.rb:1411:in
`has_and_belongs_to_many'
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/autosave_association.rb:137:in
`has_and_belongs_to_many'
/var/www/apps/arg/arg.rb:16:in `<class:Assembly>'
/var/www/apps/arg/arg.rb:15:in `<module:Models>'
/var/www/apps/arg/arg.rb:14:in `<top (required)>'
/usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:60:in
`load'
/usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:60:in
`load_apps'
(Continue reading)

Magnus Holm | 24 May 2011 20:21
Picon
Gravatar

Re: anyone run into this activerecord error before?

It seems that you need to establish a connection *before* you write
your models. Doesn't seem to be a way around it :/

// Magnus Holm

On Tue, May 24, 2011 at 19:53, David Susco <dsusco@...> wrote:
> Not really Camping specific, but I've always had better luck asking on
> this list than any of the rails ones. I'm trying to upgrade from
> activerecord 2.3.8 to 3.0.7 and I'm getting a
> ActiveRecord::ConnectionNotEstablished error when the
> has_and_belongs_to_many association is being used.
>
> A simple example is attached, and the stack follows. Has anyone run
> into this before?
>
> !! Error loading /var/www/apps/arg/arg.rb:
> ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in
> `retrieve_connection'
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in
> `retrieve_connection'
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in
> `connection'
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/associations.rb:1806:in
> `create_has_and_belongs_to_many_reflection'
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/associations.rb:1411:in
> `has_and_belongs_to_many'
> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/autosave_association.rb:137:in
> `has_and_belongs_to_many'
> /var/www/apps/arg/arg.rb:16:in `<class:Assembly>'
(Continue reading)

Jeremy McAnally | 24 May 2011 20:49
Picon
Gravatar

Re: anyone run into this activerecord error before?

It's likely trying to get the columns or something like that and
doesn't have a connection to do so.

--Jeremy

On Tue, May 24, 2011 at 2:21 PM, Magnus Holm <judofyr@...> wrote:
> It seems that you need to establish a connection *before* you write
> your models. Doesn't seem to be a way around it :/
>
> // Magnus Holm
>
> On Tue, May 24, 2011 at 19:53, David Susco <dsusco@...> wrote:
>> Not really Camping specific, but I've always had better luck asking on
>> this list than any of the rails ones. I'm trying to upgrade from
>> activerecord 2.3.8 to 3.0.7 and I'm getting a
>> ActiveRecord::ConnectionNotEstablished error when the
>> has_and_belongs_to_many association is being used.
>>
>> A simple example is attached, and the stack follows. Has anyone run
>> into this before?
>>
>> !! Error loading /var/www/apps/arg/arg.rb:
>> ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished
>> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in
>> `retrieve_connection'
>> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in
>> `retrieve_connection'
>> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in
>> `connection'
>> /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.0.7/lib/active_record/associations.rb:1806:in
(Continue reading)

David Susco | 24 May 2011 23:06
Picon

Re: anyone run into this activerecord error before?

Apparently its a known issue:

http://webcache.googleusercontent.com/search?q=cache:cS8js8AYQHgJ:https://rails.lighthouseapp.com/projects/8994/tickets/6233

Looks like I get to migrate to has_many :through. :P

Dave

On Tue, May 24, 2011 at 2:49 PM, Jeremy McAnally
<jeremymcanally@...> wrote:
> It's likely trying to get the columns or something like that and
> doesn't have a connection to do so.
>
> --Jeremy
>
> On Tue, May 24, 2011 at 2:21 PM, Magnus Holm <judofyr@...> wrote:
>> It seems that you need to establish a connection *before* you write
>> your models. Doesn't seem to be a way around it :/
>>
>> // Magnus Holm
>>
>> On Tue, May 24, 2011 at 19:53, David Susco <dsusco@...> wrote:
>>> Not really Camping specific, but I've always had better luck asking on
>>> this list than any of the rails ones. I'm trying to upgrade from
>>> activerecord 2.3.8 to 3.0.7 and I'm getting a
>>> ActiveRecord::ConnectionNotEstablished error when the
>>> has_and_belongs_to_many association is being used.
>>>
>>> A simple example is attached, and the stack follows. Has anyone run
>>> into this before?
(Continue reading)


Gmane