Problems trying to run rails server

93 views
Skip to first unread message

Alistair Laing

unread,
May 31, 2014, 3:38:06 PM5/31/14
to rubyin...@googlegroups.com
Hi,

I'm new to Ruby on Rails. I've used the latest version of RubyInstaller (64 bit version). I also donwloaded installed and configured Devkit and have a basic application setup.

When I try "rails server" in cmd.exe I get this error message https://gist.github.com/aliuk2012/86260614540b1ed25b24#file-rails-server-output

Any ideas what it maybe. Heres my local gems I have installed.

*** LOCAL GEMS ***

actionmailer (4.1.1)
actionpack (4.1.1)
actionview (4.1.1)
activemodel (4.1.1)
activerecord (4.1.1)
activesupport (4.1.1)
arel (5.0.1.20140414130214)
bigdecimal (1.2.0)
builder (3.2.2)
bundler (1.6.2)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
erubis (2.7.0)
execjs (2.1.0)
hike (1.2.3)
i18n (0.6.9)
io-console (0.4.2)
jbuilder (2.0.7)
jquery-rails (3.1.0)
json (1.8.1, 1.7.7)
mail (2.5.4)
mime-types (1.25.1)
minitest (5.3.4, 4.3.2)
multi_json (1.10.1)
mysql2 (0.3.16)
polyglot (0.3.5)
psych (2.0.0)
rack (1.5.2)
rack-test (0.6.2)
rails (4.1.1)
railties (4.1.1)
rake (10.3.2, 0.9.6)
rdoc (4.1.1, 4.0.0)
rubygems-update (2.2.2)
sass (3.2.19)
sass-rails (4.0.3)
sdoc (0.4.0)
sprockets (2.12.1, 2.11.0)
sprockets-rails (2.1.3)
test-unit (2.0.0.0)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
turbolinks (2.2.2)
tzinfo (1.2.0)
uglifier (2.5.0)


Luis Lavena

unread,
May 31, 2014, 3:47:19 PM5/31/14
to rubyin...@googlegroups.com
Hello and welcome,

On Sat, May 31, 2014 at 4:38 PM, Alistair Laing <ad...@laingsonline.co.uk> wrote:
Hi,

I'm new to Ruby on Rails. I've used the latest version of RubyInstaller (64 bit version). I also donwloaded installed and configured Devkit and have a basic application setup.

When I try "rails server" in cmd.exe I get this error message https://gist.github.com/aliuk2012/86260614540b1ed25b24#file-rails-server-output
 
Any ideas what it maybe. Heres my local gems I have installed.


Seems the segfault is getting triggered by mysql2 gem, and since you mention 64bits RubyInstaller, most likely is triggered by the incorrect linking library.

Can you confirm how you build mysql2 gem? Have you used MySQL Connector/C 64bits binaries?

If that is the case, this is a known issue caused by the linking library being incompatible with GCC (the toolchain used by RubyInstaller)

See the following list of issues reporting this same problem:



There are a proposed list of solutions there but I'm not familiar with the instructions.

Can you try that and let us know?

Hope that helps,
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Alistair Laing

unread,
Jun 1, 2014, 1:01:55 PM6/1/14
to rubyin...@googlegroups.com
Hi Luis,

Thanks for the pointers.

first i tired just gem install mysql that failed.

I copied over libmysql.dll from MySQL installation to my Ruby bin folder, tried again, that failed too.

I tried

gem install mysql2 --no-rdoc --no-ri -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include"'

That compiled and returned a success message.

I'm going to uninstall MySQL as I've had this version floating around a bit and have just updated it to 5.6. once thats done I'll give the solution in the https://github.com/brianmario/mysql2/issues/372 a try.

I'll keep you posted on my progress.


Thanks again for your help and support.

Message has been deleted

Luis Lavena

unread,
Jun 1, 2014, 1:11:15 PM6/1/14
to rubyin...@googlegroups.com
On Sun, Jun 1, 2014 at 2:06 PM, Alistair Laing <ad...@laingsonline.co.uk> wrote:
I've just downloaded and installed mysql-installer-web-community-5.6.19.0.msi do I need to download and install the mysql connectors/c seperately?

It is recommended.

But please also read the comments on the threads I've linked before, these expose the issue about the linking library (the one bundle with the installer or the connector/c) that is incompatible with the 64bits version of Ruby.

You will need to remove that linking library (.lib) in order for the system to use .dll instead or proceed with the manual generation of the linking library as described.

If you use the MySQL installer to link against its library, any update of it will break your mysql/mysql2 gem installation since there are binary incompatibilities with the DLL.

That is why is recommended you use the MySQL Connector/C.

Once again, if there is no real need for you to use the 64bits version of Ruby (most likely there isn't) I strongly recommend you uninstall and use the 32bits version instead.

Hope that makes sense.
-- 

Alistair Laing

unread,
Jun 7, 2014, 9:43:51 AM6/7/14
to rubyin...@googlegroups.com
Just an update.

I tried 32 bit versions and some older versions and just couldn't get it to work. I eventually went with setting up ubuntu VM and the cofgiuration was pretty straight forward from there.

Luis Lavena

unread,
Jun 7, 2014, 10:10:49 AM6/7/14
to rubyin...@googlegroups.com
On Sat, Jun 7, 2014 at 10:43 AM, Alistair Laing <ad...@laingsonline.co.uk> wrote:
Just an update.

I tried 32 bit versions and some older versions and just couldn't get it to work. I eventually went with setting up ubuntu VM and the cofgiuration was pretty straight forward from there.


Most likely you tried to use MySQL connector C or the MySQL DLL from a 64bits version against a 32bits version of Ruby.

This was indicated in the links I provided before.

Anyhow, glad to hear you managed your way around (and you had the expertise to deal with Linux).

Cheers,
Reply all
Reply to author
Forward
0 new messages