Re: [Radiant] Problem with RSpec and running other tasks

2009-01-09 Thread Paul Ingles
Sorry, meant to add an example of the output:

/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:229:in 
`files_to_load?:
File or directory not found: RAILS_ENV=production
(RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`each?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`files_to_load?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:98:in 
`run_examples?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec.rb:21:in `run?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb:191:in 
`register_at_exit_hook?
from /usr/bin/rake:19

Thanks again
 
On Friday, January 09, 2009, at 05:46AM, Paul Ingles ping...@me.com wrote:
Hi,

I'm trying to deploy Radiant to a host, and am getting errors during the 
deploy. Part of the deploy script runs a task to ensure the database and other 
environment stuff is setup (files in the right place etc.). This is triggered 
via. the db:check:config task which is executed by the Capistrano script.

It seems that the RSpec specs are being loaded (and thus triggering their 
at_exit hook to execute) no matter what task I run. As a result, it attempts 
to parse a list of files off the command line, which, will be the incorrect: 
RAILS_ENV=production rake db:check:config.

I don't seem to remember seeing this behaviour with a boilerplate Rails app 
with RSpec specs. Incidentally I'm using RSpec 1.1.11.

I'll keep digging and see if I can see where this is happening (and submit a 
patch if I find anything), but was hoping somebody might have seen something 
similar and/or know where to look.

Thanks,
Paul
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with RSpec and running other tasks

2009-01-09 Thread Sean Cribbs
Radiant provides two tasks to set the environment: production and 
development.  So you can run the rake task like so:


rake production db:check:config

Sean

Paul Ingles wrote:

Sorry, meant to add an example of the output:

/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:229:in 
`files_to_load?:
File or directory not found: RAILS_ENV=production
(RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`each?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`files_to_load?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:98:in 
`run_examples?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec.rb:21:in `run?
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb:191:in 
`register_at_exit_hook?
from /usr/bin/rake:19

Thanks again
 
On Friday, January 09, 2009, at 05:46AM, Paul Ingles ping...@me.com wrote:
  

Hi,

I'm trying to deploy Radiant to a host, and am getting errors during the 
deploy. Part of the deploy script runs a task to ensure the database and other 
environment stuff is setup (files in the right place etc.). This is triggered 
via. the db:check:config task which is executed by the Capistrano script.

It seems that the RSpec specs are being loaded (and thus triggering their at_exit hook to 
execute) no matter what task I run. As a result, it attempts to parse a list of files off 
the command line, which, will be the incorrect: RAILS_ENV=production rake 
db:check:config.

I don't seem to remember seeing this behaviour with a boilerplate Rails app 
with RSpec specs. Incidentally I'm using RSpec 1.1.11.

I'll keep digging and see if I can see where this is happening (and submit a 
patch if I find anything), but was hoping somebody might have seen something 
similar and/or know where to look.

Thanks,
Paul
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant




___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

  


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with RSpec and running other tasks

2009-01-09 Thread Paul Ingles

Thanks Sean,

Changing it to execute that way still leaves it outputting

(in /home/rails/myapp/releases/20090109135907)
Checking database mysql configuration...
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb: 
229:in `files_to_load':

File or directory not found: production (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:221:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:221:in `files_to_load'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:98:in `run_examples'

from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec.rb:21:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb: 
191:in `register_at_exit_hook'

from /usr/bin/rake:19

On 9 Jan 2009, at 13:53, Sean Cribbs wrote:


production


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with RSpec and running other tasks

2009-01-09 Thread Sean Cribbs

Can you run it with --trace?

Sean

Paul Ingles wrote:

Thanks Sean,

Changing it to execute that way still leaves it outputting

(in /home/rails/myapp/releases/20090109135907)
Checking database mysql configuration...
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:229:in 
`files_to_load':

File or directory not found: production (RuntimeError)
from 
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`each'
from 
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:221:in 
`files_to_load'
from 
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb:98:in 
`run_examples'

from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec.rb:21:in `run'
from 
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb:191:in 
`register_at_exit_hook'

from /usr/bin/rake:19

On 9 Jan 2009, at 13:53, Sean Cribbs wrote:


production


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with RSpec and running other tasks

2009-01-09 Thread Paul Ingles

Hi Sean,

Sorry- looks like that was incorrect. I don't get the RSpec errors  
now, but it still fails to deploy. Here's the new output:


  * executing sh -c 'cd /home/rails/myapp/releases/20090109173841;  
rake  production db:check:config --trace'

servers: [my.vm.brightbox.net]
[my.vm.brightbox.net] executing command
 ** [out :: my.vm.brightbox.net] (in /home/rails/myapp/releases/ 
20090109173841)

 ** [out :: my.vm.brightbox.net] ** Invoke production (first_time)
 ** [out :: my.vm.brightbox.net] ** Execute production
 ** [out :: my.vm.brightbox.net] ** Invoke environment (first_time)
 ** [out :: my.vm.brightbox.net] ** Execute environment
command finished
*** [deploy:update_code] rolling back

Hmmm... I'll keep digging


On 9 Jan 2009, at 14:21, Sean Cribbs wrote:


Can you run it with --trace?

Sean

Paul Ingles wrote:

Thanks Sean,

Changing it to execute that way still leaves it outputting

(in /home/rails/myapp/releases/20090109135907)
Checking database mysql configuration...
/usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/options.rb: 
229:in `files_to_load':

File or directory not found: production (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:221:in `each'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:221:in `files_to_load'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner/ 
options.rb:98:in `run_examples'

from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec.rb:21:in `run'
from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.11/lib/spec/runner.rb: 
191:in `register_at_exit_hook'

from /usr/bin/rake:19

On 9 Jan 2009, at 13:53, Sean Cribbs wrote:


production


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant