views:

921

answers:

3

Hi guys,

My website is developed with ruby on rails 2.0.2. So I want to update this version to 2.3.5.

Unfortunately, the new rails version doesn't include mysql so I install the mysql gem like this tutorial said => install rails

But and it's my problem, when I launch my server (webrick), mysql crash (segmentation fault). I don't find why mysql crash and I can't continue to develop my website.

Someone can help me ?

Thanks.

+2  A: 

I had a similar problem this guide solved it for me:

http://norbauer.com/notebooks/code/notes/snow-leopard-upgrading-for-rails-developers

Given:

$ sudo mv /usr/local/mysql/data /usr/local/mysql/data.default
$ sudo mv /usr/local/mysql-oldversion/data /usr/local/mysql/data
$ sudo gem uninstall mysql
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
$ sudo gem pristine --all

Let us know if it helps.

The Tailor
A: 

Hi, thanks for your help, mysql doesn't crash now :)

But, I get this error now:

=> Booting WEBrick => Rails 2.3.5 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2009-12-12 13:51:59] INFO WEBrick 1.3.1 [2009-12-12 13:51:59] INFO ruby 1.8.7 (2009-06-12) [i686-darwin10.2.0] [2009-12-12 13:51:59] INFO WEBrick::HTTPServer#start: pid=99433 port=3000

Processing ActionController::Base#index (for 127.0.0.1 at 2009-12-12 13:52:05) [GET]

NameError (uninitialized constant ApplicationController): app/controllers/user_controller.rb:1 /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in start'

/!\ FAILSAFE /!\ Sat Dec 12 13:52:05 +0100 2009 Status: 500 Internal Server Error

ActionView::TemplateError (undefined method `debug' for #) in /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/_request_and_response.erb:

/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'


In /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/templates/rescues/_request_and_response.erb


/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'

When I launch my server and I try to go in the home page.

Update rails is very not simple :(

Kiva
A: 

I found the problem, with rails 2.3, application.rb is renamed application_crontroller.rb.

Kiva