Re: [Radiant] Problem resurecting old site on Dreamhost

2012-08-01 Thread Jim Gay
On Wed, Aug 1, 2012 at 10:17 AM, Anton J Aylward
radi...@antonaylward.com wrote:
 There is an old radiant site I'm trying to get working (again) on Dreamhost.

 The error on the web site is:

 -
  The application has exited during start-up (i.e. during the evaluation
 of config/environment.rb). The error message can be found below. To
 solve this problem, please follow any instructions in the error message.

 Error message:
 Your config/boot.rb is outdated: Run rake rails:update.
 --

 yes but

 All this depends on which version of rails, ruby 

 I THINK is is 0.8.1 or 0.9.1

 I *seems* that there is no copy of the relevant revision of rails under
 /vendor/

Is there a copy of Radiant in vendor/radiant?

If not, check which version of the radiant gem you have and copy the
source to vendor/radiant.

If things are screwed up, you may not be able to run rake tasks
without running into errors like these. So putting a copy of Radiant
in vendor/radiant will at least freeze the initialization to that
copy. Radiant looks there first before looking to the gems you have.


 Which version rake to run
 The one in /usr/bin or the one in ~/.gems/bin ?

 ---
 $ /usr/bin/rake rails:update
 rake aborted!
 uninitialized constant Rake::DSL
 ~/.gems/gems/radiant-0.9.1/Rakefile:4
 
 $ ~/.gems/bin/rake rails:update
 WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require
 'rdoc/task' (in RDoc 2.4.2+)' instead.
 at ~/.gems/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
 rake aborted!
 Don't know how to build task 'rails:update'
 --

 I'm lost ...


Don't attempt to update Rails for the project.

It appears as if you have Radiant 0.9.1, but run gem list radiant to
see what versions are on your server.
It's possible that the site was started with 0.8.1 (for example) but a
newer gem was later installed.

Try setting up vendor/radiant and let us know what happens then.

If you get different errors that means your changes did something. If
you keep getting the same error, then the problem might be elsewhere.

If you are successful in moving along, check out this gist where I
created instructions for upgrading https://gist.github.com/1540782

I'll update that with any details that you provide to help clarify the process.

-Jim


-- 
Write intention revealing code #= http://www.clean-ruby.com

Jim Gay
Saturn Flyer LLC
571-403-0338


Re: [Radiant] Problem resurecting old site on Dreamhost

2012-08-01 Thread Anton J Aylward
Jim Gay said the following on 08/01/2012 10:35 AM:
 On Wed, Aug 1, 2012 at 10:17 AM, Anton J Aylward
 [... snip  see previous in thread ...]

 
 Don't attempt to update Rails for the project.

GOTCHA!  I had it that far :-)

 It appears as if you have Radiant 0.9.1, but run gem list radiant to
 see what versions are on your server.

$ gem list radiant

*** LOCAL GEMS ***

radiant (0.9.1, 0.8.1, 0.6.9)
radiant-archive-extension (1.0.7)
radiant-clipped-extension (1.0.17)
radiant-debug-extension (1.0.2)
radiant-exporter-extension (1.0.3)
radiant-markdown_filter-extension (1.0.2)
radiant-sheets-extension (1.0.10)
radiant-site_templates-extension (1.0.5)
radiant-smarty_pants_filter-extension (1.0.2)
radiant-textile_filter-extension (1.0.4)





 It's possible that the site was started with 0.8.1 (for example) but a
 newer gem was later installed.
 
 Try setting up vendor/radiant and let us know what happens then.

Its a long time since I did that, is this right?

$ rake radiant:freeze:gem
rake aborted!
uninitialized constant Rake::DSL
~/.gems/gems/radiant-0.9.1/Rakefile:4
(See full trace by running task with --trace)

Oh, maybe other version of rake ...

$ ~/.gems/bin/rake radiant:freeze:gem
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require
'rdoc/task' (in RDoc 2.4.2+)' instead.
at ~/.gems/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
rake aborted!
Don't know how to build task 'radiant:freeze:gem'

$ rake -V
rake, version 0.8.7

$ ~/.gems/bin/rake -V
rake, version 0.9.2.2

According to log/production.log the error I get truing to start is


Processing SiteController#show_page (for 99.226.244.166 at 2012-08-01
08:48:29) [GET]
  Parameters: {action=show_page, url=/, controller=site}

NoMethodError (undefined method `locale' for #User:0x2d7b3356aa0):
  radiant (0.9.1) app/controllers/application_controller.rb:70:in
`set_user_locale'
  radiant (0.9.1)
vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:20:in `process'
  /dh/passenger/lib/phusion_passenger/rack/request_handler.rb:96:in
`process_request'
  /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:513:in
`accept_and_process_next_request'
  /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:274:in
`main_loop'

/dh/passenger/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in
`start_request_handler'

/dh/passenger/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in
`send'

/dh/passenger/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in
`handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/utils.rb:479:in `safe_fork'

/dh/passenger/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in
`handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:180:in `start'

/dh/passenger/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in
`start'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:219:in
`spawn_rails_application'

/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:132:in
`lookup_or_add'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:214:in
`spawn_rails_application'

/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:82:in
`synchronize'

/dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in
`synchronize'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:213:in
`spawn_rails_application'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:132:in
`spawn_application'
  /dh/passenger/lib/phusion_passenger/spawn_manager.rb:275:in
`handle_spawn_application'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:357:in
`server_main_loop'
  /dh/passenger/lib/phusion_passenger/abstract_server.rb:206:in
`start_synchronously'
  /dh/passenger/helper-scripts/passenger-spawn-server:99

Rendering /. /public/500.html (500 Internal Server
Error)


 If you get different errors that means your changes did something. 

+1

Maybe I should try 0.8.1 ?

Is there a way I can force that?

If you keep getting the same error, then the problem might be elsewhere.

:-)



-- 
It is the test of a good religion whether you can joke about it.
  - G. K. Chesterton