2
  1. I have 2 environments: development and development_with_production_data.
  2. The environments only differ in their database.yml entries:

    development:
      host: 127.0.0.1
      adapter: mysql2
      encoding: utf8
      database: [REDACTED]_development
      username: root
      password:
      pool: 5
    
    development_with_production_data:
      host: [REDACTED]
      port: [REDACTED]
      adapter: mysql2
      encoding: utf8
      database: [REDACTED]_production
      username: [REDACTED]
      password: [REDACTED]
      pool: 5
    
  3. I have verified that the values I have [REDACTED] above are the correct values. I have a gui that can connect just fine and a rails 2 app that connects with the same [REDACTED] values.

  4. Loading up and working on the development environment work perfect, locally.
  5. Loading up and working on the development_with_production_data environment will not even anything but static, cached pages. No error messages, no timeouts, nothing. All I see is this:

    coneybeare $ rails s -e development_with_production_data
    NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
    Gem::SourceIndex#all_gems called from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:256
    .
    => Booting WEBrick
    => Rails 3.0.7 application starting in development_with_production_data on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2011-05-09 01:23:48] INFO  WEBrick 1.3.1
    [2011-05-09 01:23:48] INFO  ruby 1.8.7 (2009-06-12) [i686-darwin10]
    [2011-05-09 01:23:48] INFO  WEBrick::HTTPServer#start: pid=3854 port=3000
    
  6. I am using rails 3.0.7 and have tried both mysql2 0.3.2 and mysql2 0.2.7

What could be causing this?

2 Answers 2

1

I finally solved this by updating my ruby to 1.9.2 on my mac using RVM. Then I had to reinstall the bundle gem, rails gem, and do a bundle install. Previously I had been using 1.8.7 and for some reason, it was causing the hang.

Sign up to request clarification or add additional context in comments.

Comments

0

Try to install mysql2 0.2.x because there is some issues with mysql2 0.3.x in rails 3.0.7

2 Comments

Thanks, I did try that too (should have mentioned it) but the same problem occurred. gem 'mysql2', '< 0.3'. Also everything works fine when connecting to localhost
Oh, I see ..sometimes Rails throws unknown WTFs :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.