Problem with installing gems and run server (weird, the project run so well yesterday)

Good afternoon

Excuse me, i have a problem with rails 4.0.0, i’ve been working with this framework for the last 4 months, without any problem or issue, but now when i try to run one server on windows so, a project to i’ve been working for the last week and working fine, appear this error:

It’s not your application, it’s the environment. Both the PostgreSQL and MySQL gems have portions written in C that must be compiled locally on each machine. If it can’t complete the compile, the gem doesn’t install. That is what’s happening on your server. The code requires a C extension that your system is not giving it access to.

It appears that you’re running jruby (ruby running in a java virtual machine) and on Windows. I can’t help you with either one, sorry, but that’s the issue.

It is right; you are running JRuby and not ruby; If it’s the case, you should install all the needed gems by prefixing it as follows:

jruby -S bundle install

If not, I had the same problem on a Windows box, i.e. JRuby had some priorities on the Ruby installation. The only way to fix it was to uninstall JRuby completely and everything came back to the normal.

It looks like you’ve installed jruby, which requires different gems for some things. It doesn’t sound like you wanted this at all, so you’ve either got to

  • remove jruby

  • change your PATH environment variable so that it doesn’t appear ahead of ‘normal’ ruby

  • use something like uru ( Bitbucket ) to manage multiple rubies

Fre