got a strange issue on my development local machine, webrick idle http://0.0.0.0:3000 at …/statuses url link of rails welcome aboard
page,
and I can’t see rails logo, seems a mysql2 connection fault, from my
local
machine I hit a remote mysql database, but I verified mysql remote
access
to my remote server, it’s ok, verified socket, ok, no firewall blocks,
etc.
and when I try to close webrick can’t shutdown with ctrl-C, I have to
hit
ctrl-C and ctrl-Z to shutdown correctly.
OS independent, same issue, same setup - Aptana Studio 3, rails 3.2.8,
ruby
1.8.7 - on CentOS 6.5 and Ubuntu 12.04
BUT
NO ISSUE with a different setup - rails 3.2.8 and ruby 1.9.2 (or 2.x) -
what’s up?
I need my project working with ruby 1.8.7 because of phusion passenger
dependencies on my RHEL server
BUT
NO ISSUE with a different setup - rails 3.2.8 and ruby 1.9.2 (or 2.x) -
I think you need to give us some clues. I don’t understand what you
mean by ‘can’t see rails logo’. Are there any errors in the server
terminal window or the rails log?
=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2014-02-27 03:37:20] INFO WEBrick 1.3.1
[2014-02-27 03:37:20] INFO ruby 1.8.7 (2011-06-30) [i686-linux]
[2014-02-27 03:37:25] INFO WEBrick::HTTPServer#start: pid=12143
port=3000
development.log is
Started GET “/assets/rails.png” for 127.0.0.1 at Thu Feb 27 03:44:29
+0100
2014
Connecting to database specified by database.yml
It would be unusual to provide both a socket and a host. Perhaps the
connection is blocked (firewall etc) and ruby is waiting in vain for the
connection to open?
[2014-02-27 03:37:25] INFO WEBrick::HTTPServer#start: pid=12143 port=3000
development.log is
Started GET “/assets/rails.png” for 127.0.0.1 at Thu Feb 27 03:44:29 +0100
2014
Connecting to database specified by database.yml
Please don’t top post it makes it difficult to follow the thread, post
your reply inline at appropriate points, thanks.
If there is nothing else after that then I suggest it is hanging
trying to access the mysql server. Have you tried leaving it for some
minutes to see if something eventually times out and gives you some
more clues?
Are there any mysql logs on the server that might be useful?
You said, I think, that it works ok with a later version of ruby.
Perhaps the mysql2 adaptor you are using is ruby version specific.
Il giorno giovedì 27 febbraio 2014 12:55:50 UTC+1, Frederick C. ha
scritto:
reconnect: false
Fred
Don’t know, Fred, it’s a rebus, I can connect correctly with a different
setup (ruby 1.9.2 + rails 3.2.8), can’t connect with ruby 1.8.7 + rails
3.2.8, so I think it’s not a mysql/firewall misconfiguration, it’s an
issue
related to ruby version
…
mysql2 gem version on my local development machine is 0.3.11
You could try with the latest version of mysql, or drop back to 0.2.
Perhaps there were issues with 0.3.11 and ruby 1.8.7. Possibly a long
shot but worth a try.
It’s been a while since I last struggled with the 1.8.7 / 1.9 ruby
transition with rails 3 and mysql but I’m wondering. Is it possible you
have a version issue in the ‘gem install…’ sequence that’s causing
your
rails app not to connect to mysql?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.