Error: RubyMine 5.0.1 + Ruby 2.0.0: Wrong "Language level", can't install Gems?

Hi all.

I installed Ruby 2.0.0 (on a Win7/64 PC) and it works fine with RubyMine 5.0.1. But if I then go to "File" -> "Settings" -> "Ruby SDK and Gems", a "Install Gems..." doesn't work.
Obviously, this is because the "Ruby SDK" is a Ruby 2.0.0 level while the "Language Level" is still version 1.9, because if I switch back the "Ruby SDK" version to 1.9.2-p290, everything works as expected: RubyMine finds Gems and installs them as it shoud.

But as you see on the screenshot attached, I cannot switch the "Language level" upwards to V2.0 -it is greyed out:

RubyError2.jpg

I'm stuck -what do I have to do to be able to change the "language level" accordingly?

Thanks!

17 comments

I installed Ruby 2.0.0 with "rvm install ruby-head".  Gems-library installation is OK with RubyMine 5.0.  But a problem is that the language level is fixed as 1.8!

0

Hi,

there is no such a language level as 2.0, so any 2.0.0 should has language level 1.9.
The problem with gem installation should have different reason.
Does RM report something when you try to install gem?

Regards, Oleg.

0

Hi Oleg,

Does RM report something when you try to install gem?

no -it is that if I press the "Install Gems..." button, RM just tells "Listing remote gems..." without ever finishing or even showing up a single entry!  -I manually pressed "cancel" about 2 hours later, w/o any list entry at all.
(Note that as written, if I switch SDK-selection to 1.9.2, everything works as expected; so it definitely has something to do with the 2.0.0 version)

-Is there some sort of logfile where one could dig out some more information of what's happening here?

Regards

0

Yes, check Help|Reveal Logs in ... menu items.

Oleg.

0

Hi Oleg,

well.. -pressing the "Install gems..." button does not create any entries in the idea.log file.

However, switching the SDK from 1.9.2 to 2.0.0 does -and also pressing the "cancel"-button; I attach the idea.log snippet to this post, search for "##" to find my comments.

Just as an additional hint: When I use 1.9.2, pressing "Install gems..." results into a message "Listing remote gems.." for about 5sec, then it flips to "Downloading gems: github.com" and ~30sec later, I have the list of gems.
As described, doing the same with 2.0.0 results in that "Listing remote gems.." sitting there forever.

Hope you can figure out something from that?

Regards



Attachment(s):
idea.log.zip
0

It looks like RM is trying to list remote gems from github, it uses somthing like "gem list --remote --source http://gems.github.com".
Could you try if the command works fine in command line?
BTW it looks like you have bundler pre-release, perhaps you should update it to released version.

Regards, Oleg

0

Hi Oleg,

it uses somthing like "gem list --remote --source http://gems.github.com".
Could you try if the command works fine in command line?

seems you hit the bull's eye: In 1.9.2, this command produces a long list of entries. In 2.0.0, it just prints one line "*** REMOTE GEMS ***" and then just sits there forever.

So it seems that 2.0.0 has a problem here; strange that nobody came up with this one already..?

Regards

Oh, BTW: a "gem update bundler" just tells me that there is nothing to update. Just to be sure, I issued both a "gem update --system" and a "gem uninstall bundler" + "gem install bundler".
In the end, it tells me..

C:\Ruby200\bin>gem install bundler
Fetching: bundler-1.3.1.gem (100%)
Successfully installed bundler-1.3.1
Parsing documentation for bundler-1.3.1
Installing ri documentation for bundler-1.3.1
Done installing documentation for bundler (9 sec).
1 gem installed



C:\Ruby200\bin>gem update --system
Latest version currently installed. Aborting.

0

How you installed 2.0.0 on Windows?  Perhaps the installation is broken/incomplete?  Unfortunately Ruby On Windows is very sad story :(

Regards, Oleg.

0

Hi Oleg,

How you installed 2.0.0 on Windows?  Perhaps the installation is broken/incomplete?  Unfortunately Ruby On Windows is very sad story :(

I used the installer from http://rubyinstaller.org/downloads/

-Meanwhile, I uninstalled the 2.0.0 (it was a 32bit version), manually cleaned up the C: drive and re-installed the 64bit version. But again, same behavior as before!?
I can choose the 2.0.0 as SDK within RubyMine and can code & run some simple Ruby scripts -so Ruby seems to work. It is just that the gems management doesn't work.

Regards

0

Since it is not RubyMine's problem, but general ruby on WIndows problem I'd suggest to discuss this on https://groups.google.com/forum/?fromgroups#!forum/rubyinstaller

Oleg.

0

Nope, this is not limited to Windows.  I too am having this same [apparent] issue using RubyMine 5.0.1 and Ruby 2.0.0 under Mac OS X.

Steps to recreate:

  1. Create a new project.
  2. Go into Settings -> Ruby SDK and Gems
  3. Choose "Ruby SDK: RVM: ruby-2.0.0-p0 [global]"
  4. Click either "Install Gems" or "Update Gems" will just sit at "Downloading gems: https://rubyorg" with a spinner turning forever.


My Gem Repositories URLs lists:

https://rubygems.org

Which I changed from http://gems.github.org (which I thought was really weird since it's been defunct for a while now)

0

Update:  This is in RM version 5.0.2

0

It looks like "gem list --remote --all --prerelease --source https://rubygems.org" (which we use to get list of gems) never ends :(

Oleg.

0

I have the same issue.

It is unworkable with 2.0.0. The list never comes back.

Even if this is a Ruby problem, it makes RubyMine pretty useless.

The issue was reported in https://github.com/rubygems/rubygems/issues/487

When I do "gem list --remote --clear-sources --source http://gems.github.com -V" I do see the get commands working, but it seems slow.

Now the following command returns very quickly:

gem list --remote --clear-sources --source http://gems.github.com -V zz

With no way to filter the results and no warning or progress update, there is no way to know how long this will take.

I suggest reviewing the underlying request to optimize it or request a filter from the user so that it runs on a subset.

Cheers,

-gt

0

Could you please file a ticket about this problein in our tracker - http://youtrack.jetbrains.com/issues/RUBY

Thanks, Oleg.

0

Please sign in to leave a comment.