I’m trying to set up RoR on a laptop and having all sorts of troubles.
I’m running XP SP2, I did a quick install of appache/mysql using Xampp,
which worked fine.
I grabbed the latest windows install of ruby and rails, installed it ok
and got it running.
The moment I try to run a rails page that queries a database, it fails
every time, and I get the following error:
Mysql::Error: Lost connection to MySQL server during query: SHOW FIELDS
FROM users
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract_adapter.rb:88:in
log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:180:inexecute’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:278:in
columns' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:734:incolumns’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1663:in
attributes_from_column_definition' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:1185:ininitialize_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/callbacks.rb:236:in
initialize' #{RAILS_ROOT}/app/controllers/account_controller.rb:20:innew’
#{RAILS_ROOT}/app/controllers/account_controller.rb:20:in `signup’
I tried to update the mysql gem by typing gem install mysql, and when I
do, I get the following errors as well:
C:>gem install mysql
C:>“c:\ruby\bin\ruby.exe” “c:\ruby\bin\gem” install mysql
Attempting local installation of ‘mysql’
Local gem file not found: mysql*.gem
Attempting remote installation of ‘mysql’
Building native extensions. This could take a while…
ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7 for
inspection.
ruby extconf.rb install mysql\nchecking for mysql_query() in
mysqlclient.lib…
. no
checking for main() in m.lib… yes
checking for mysql_query() in mysqlclient.lib… no
checking for main() in z.lib… no
checking for mysql_query() in mysqlclient.lib… no
checking for main() in socket.lib… no
checking for mysql_query() in mysqlclient.lib… no
checking for main() in nsl.lib… no
checking for mysql_query() in mysqlclient.lib… no
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
So what the hell am I doing wrong??? Never had the slightest problem in
the past getting RoR working. This is my application environment:
Ruby version 1.8.2 (i386-mswin32)
RubyGems version 0.8.10
Rails version 1.0.0
Active Record version 1.13.2
Action Pack version 1.11.2
Action Web Service version 1.0.0
Action Mailer version 1.1.5
Active Support version 1.2.5
Application root C:/rails/test
Environment development
Database adapter mysql
thanks for any clues, sure its something simple (I hope)