From deveritt at innotts.co.uk Wed May 18 06:44:08 2011 From: deveritt at innotts.co.uk (Dave Everitt) Date: Wed, 18 May 2011 11:44:08 +0100 Subject: update breaks hello clock? Message-ID: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> 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 @time = Time.now render :sundial end end end module Nuts::Views def layout html do head do title { "Nuts And GORP" } end body { self << yield } end end def sundial p "The current time is: #{@time}" end end Dave From judofyr at gmail.com Wed May 18 08:07:20 2011 From: judofyr at gmail.com (Magnus Holm) Date: Wed, 18 May 2011 14:07:20 +0200 Subject: update breaks hello clock? In-Reply-To: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> References: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> Message-ID: 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 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 - > > Camping.goes :Nuts > > module Nuts::Controllers > ?class Index < R '/' > ? ?def get > ? ? ?@time = Time.now > ? ? ?render :sundial > ? ?end > ?end > end > > module Nuts::Views > ?def layout > ? ?html do > ? ? ?head do > ? ? ? ?title { "Nuts And GORP" } > ? ? ?end > ? ? ?body { self << yield } > ? ?end > ?end > > ?def sundial > ? ?p "The current time is: #{@time}" > ?end > end > > > Dave > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From deveritt at innotts.co.uk Wed May 18 12:15:08 2011 From: deveritt at innotts.co.uk (Dave Everitt) Date: Wed, 18 May 2011 17:15:08 +0100 Subject: update breaks hello clock? In-Reply-To: References: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> Message-ID: <28C13969-D705-4D08-8878-9A7908A760F9@innotts.co.uk> 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 > > You can downgrade to 1.2.0 for now. > > > // Magnus Holm > > > > On Wed, May 18, 2011 at 12:44, Dave Everitt > 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 - >> >> Camping.goes :Nuts >> >> module Nuts::Controllers >> class Index < R '/' >> def get >> @time = Time.now >> render :sundial >> end >> end >> end >> >> module Nuts::Views >> def layout >> html do >> head do >> title { "Nuts And GORP" } >> end >> body { self << yield } >> end >> end >> >> def sundial >> p "The current time is: #{@time}" >> end >> end >> >> >> Dave >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From judofyr at gmail.com Wed May 18 12:36:30 2011 From: judofyr at gmail.com (Magnus Holm) Date: Wed, 18 May 2011 18:36:30 +0200 Subject: update breaks hello clock? In-Reply-To: <28C13969-D705-4D08-8878-9A7908A760F9@innotts.co.uk> References: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> <28C13969-D705-4D08-8878-9A7908A760F9@innotts.co.uk> Message-ID: 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 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 > >> 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 >> 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 - >>> >>> Camping.goes :Nuts >>> >>> module Nuts::Controllers >>> ?class Index < R '/' >>> ? def get >>> ? ? @time = Time.now >>> ? ? render :sundial >>> ? end >>> ?end >>> end >>> >>> module Nuts::Views >>> ?def layout >>> ? html do >>> ? ? head do >>> ? ? ? title { "Nuts And GORP" } >>> ? ? end >>> ? ? body { self << yield } >>> ? end >>> ?end >>> >>> ?def sundial >>> ? p "The current time is: #{@time}" >>> ?end >>> end >>> >>> >>> Dave >>> >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >>> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From deveritt at innotts.co.uk Wed May 18 13:41:04 2011 From: deveritt at innotts.co.uk (Dave Everitt) Date: Wed, 18 May 2011 18:41:04 +0100 Subject: update breaks hello clock? In-Reply-To: References: <145169CC-3265-477A-BBA4-D4344F478971@innotts.co.uk> <28C13969-D705-4D08-8878-9A7908A760F9@innotts.co.uk> Message-ID: 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 > 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 >> >>> 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 >>> 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 - >>>> >>>> Camping.goes :Nuts >>>> >>>> module Nuts::Controllers >>>> class Index < R '/' >>>> def get >>>> @time = Time.now >>>> render :sundial >>>> end >>>> end >>>> end >>>> >>>> module Nuts::Views >>>> def layout >>>> html do >>>> head do >>>> title { "Nuts And GORP" } >>>> end >>>> body { self << yield } >>>> end >>>> end >>>> >>>> def sundial >>>> p "The current time is: #{@time}" >>>> end >>>> end >>>> >>>> >>>> Dave >>>> >>>> _______________________________________________ >>>> Camping-list mailing list >>>> Camping-list at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/camping-list >>>> >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From dsusco at gmail.com Tue May 24 13:53:28 2011 From: dsusco at gmail.com (David Susco) Date: Tue, 24 May 2011 13:53:28 -0400 Subject: anyone run into this activerecord error before? Message-ID: 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 `' /var/www/apps/arg/arg.rb:15:in `' /var/www/apps/arg/arg.rb:14:in `' /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' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:105:in `reload!' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:180:in `block in reload!' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in `reload!' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:158:in `update' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:157:in `find_scripts' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:161:in `reload!' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:169:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:242:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' !! Error loading /var/www/apps/arg/arg.rb, see backtrace above 127.0.0.1 - - [24/May/2011 13:45:00] "GET / HTTP/1.1" 404 45 0.9436 -- Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: arg.rb Type: application/octet-stream Size: 1072 bytes Desc: not available URL: From judofyr at gmail.com Tue May 24 14:21:49 2011 From: judofyr at gmail.com (Magnus Holm) Date: Tue, 24 May 2011 20:21:49 +0200 Subject: anyone run into this activerecord error before? In-Reply-To: References: Message-ID: 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 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 `' > /var/www/apps/arg/arg.rb:15:in `' > /var/www/apps/arg/arg.rb:14:in `' > /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' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:105:in > `reload!' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:180:in > `block in reload!' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in > `each' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in > `reload!' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:158:in > `update' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:157:in > `find_scripts' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:161:in > `reload!' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:169:in > `call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in > `call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in > `call' > /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:242:in > `call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in > `call' > /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in > `service' > /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' > /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' > /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' > !! Error loading /var/www/apps/arg/arg.rb, see backtrace above > 127.0.0.1 - - [24/May/2011 13:45:00] "GET / HTTP/1.1" 404 45 0.9436 > > -- > Dave > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From jeremymcanally at gmail.com Tue May 24 14:49:22 2011 From: jeremymcanally at gmail.com (Jeremy McAnally) Date: Tue, 24 May 2011 14:49:22 -0400 Subject: anyone run into this activerecord error before? In-Reply-To: References: Message-ID: 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 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 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 `' >> /var/www/apps/arg/arg.rb:15:in `' >> /var/www/apps/arg/arg.rb:14:in `' >> /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' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:105:in >> `reload!' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:180:in >> `block in reload!' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in >> `each' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in >> `reload!' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:158:in >> `update' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:157:in >> `find_scripts' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:161:in >> `reload!' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:169:in >> `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in >> `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in >> `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:242:in >> `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in >> `call' >> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in >> `service' >> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' >> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' >> /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' >> !! Error loading /var/www/apps/arg/arg.rb, see backtrace above >> 127.0.0.1 - - [24/May/2011 13:45:00] "GET / HTTP/1.1" 404 45 0.9436 >> >> -- >> Dave >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- http://jeremymcanally.com/?-?http://arcturo.com/ Bowties, ties, and more:?http://wickhamhousebrand.com My books: http://r3uh.com ?http://rbip.info/ ?http://hlrb.org (FREE!) From dsusco at gmail.com Tue May 24 17:06:47 2011 From: dsusco at gmail.com (David Susco) Date: Tue, 24 May 2011 17:06:47 -0400 Subject: anyone run into this activerecord error before? In-Reply-To: References: Message-ID: 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 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 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 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 `' >>> /var/www/apps/arg/arg.rb:15:in `' >>> /var/www/apps/arg/arg.rb:14:in `' >>> /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' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:105:in >>> `reload!' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:180:in >>> `block in reload!' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in >>> `each' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:179:in >>> `reload!' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/reloader.rb:158:in >>> `update' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:157:in >>> `find_scripts' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:161:in >>> `reload!' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:169:in >>> `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in >>> `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in >>> `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/camping-2.1/lib/camping/server.rb:242:in >>> `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in >>> `call' >>> /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in >>> `service' >>> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service' >>> /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run' >>> /usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread' >>> !! Error loading /var/www/apps/arg/arg.rb, see backtrace above >>> 127.0.0.1 - - [24/May/2011 13:45:00] "GET / HTTP/1.1" 404 45 0.9436 >>> >>> -- >>> Dave >>> >>> _______________________________________________ >>> Camping-list mailing list >>> Camping-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/camping-list >>> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > > > > -- > http://jeremymcanally.com/?-?http://arcturo.com/ > Bowties, ties, and more:?http://wickhamhousebrand.com > My books: > http://r3uh.com ?http://rbip.info/ ?http://hlrb.org (FREE!) > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Dave