Integrating wxRuby into RubyMine

I want to add support for wxRuby into RubyMine. I tried adding wxRuby gem URL in Install Gems, but it gives error: Gem must be in .gz format. How to add the gem?

0
12 comments

wxruby gem is located in standard repositories, it should be avaialbe in list of remote gems in File | Settings | Ruby SDK and Gems | Install Gems... dialog
Screen Shot 2011-08-05 at 1.22.27 PM.png

"Gem urls" are urls to gem repositories, not single gems

0

Hi Chernyatchik,

wxRuby gem is not present in my "Install gems.." dialog. I double-checked it, it is not there.

0

Probably it is because you replaced default gem urls with smt else. Which ursl are shown in "gem urls" dialog?

0

It is a long list. wxRuby was not there when I installed RubyMine. I haven't uninstalled any gems. How to re-install the missing gem?

0

Ok, seems you didn't understand  my question. Let's try again - which gem urls are configured in your sdk? You said that you tried to add url to *.tar.gx there. It was wrong because dialog accepts only gem repositories urls (they have a special format etc) and not urls to some files. To check urls please:

1. Open RubyMine Preferences | Ruby SDK and Gems Manger
2. Press "Install Gems..." button
3. Then press Manage gem URLs... button. E.g. my gem repositories urls are: http://gems.github.com, http://gems.rubyonrails.org
Screen Shot 2011-08-13 at 16.32.07.png
if you have a different urls, please use mine and the press 'refresh' button

0

It seems that the two repositories urls (http://gems.github.com, http://gems.rubyonrails.org) are no more actif.....

Eddy

0

Ok, I was a bit wrong. Manage gem urls dialog alow to add additional custom (non default) repo and RubyMine collects gems from default repo (http://rubygems.org/) and custom repositories specifed in the dialog. Which ruby SDK do you use? Could you attach a diagnostic info from RubyMine | Tools | Show Gem environment dialog? In may case all works as expected and wxruby gem is in the list. I assume it is some configuration problem.

P.S: You can always install your gem from console and it will be visible in RubyMine. In console you can install it using "gem install wxruby" or you can download *.gem and install gem from *.gem distrib (see rubygems documentation). If you have several Ruby interpreters on your machine please check that you've installed gem for same ruby interpreter as in your RubyMine project sdk sdk settings.

0

Thanks for the reply but in the version 3.2.3, the listbox on the left side is empty (but not the case in v. 3.2.1) : "nothing to show" .:(
For the environnement :

RubyGems Environment:
RUBYGEMS VERSION: 1.5.2
RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32]
INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
EXECUTABLE DIRECTORY: C:/Ruby192/bin
RUBYGEMS PLATFORMS:
  ruby
  x86-mingw32
GEM PATHS:
   C:/Ruby192/lib/ruby/gems/1.9.1
   C:/Users/Eddy/.gem/ruby/1.9.1
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :benchmark => false
   :backtrace => false
   :bulk_threshold => 1000
   :sources => ["http://rubygems.org/", "http://gems.github.com"]
REMOTE SOURCES:
   http://rubygems.org/
   http://gems.github.com
----------------------
IDE: JetBrains RubyMine 3.2.3, build #RM-107.494
OS: Windows 7 6.1[x86]
Java: 1.6.0_22-b04
RubyMine SDK Environment:
Sdk: ruby-1.9.2-p180
Sdk Version: ver.1.9.2p180 p180
Ruby Interpreter: C:/Ruby192/bin/ruby.exe
RVM Sdk: no
Sdk Language Level: 1.9
Sdk Load Path:
     C:/Ruby192/lib/ruby/site_ruby/1.9.1
     C:/Ruby192/lib/ruby/site_ruby/1.9.1/i386-msvcrt
     C:/Ruby192/lib/ruby/site_ruby
     C:/Ruby192/lib/ruby/vendor_ruby/1.9.1
     C:/Ruby192/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
     C:/Ruby192/lib/ruby/vendor_ruby
     C:/Ruby192/lib/ruby/1.9.1
     C:/Ruby192/lib/ruby/1.9.1/i386-mingw32
     C:/Program Files (x86)/JetBrains/RubyMine 3.2.3/rubystubs19
Sdk Gem paths:
     file://C:/Users/Eddy/.gem/ruby/1.9.1/gems
     file://C:/Ruby192/lib/ruby/gems/1.9.1/gems
     file://C:/Users/Eddy/.gem/ruby/1.9.1/bundler/gems
     file://C:/Ruby192/lib/ruby/gems/1.9.1/bundler/gems
Gems used for 'untitled':

I have also this error when I open a project:

rm.jpg

Strange ...[Stack level too deep] !

Regards,

Eddy (newbie...!)

0

Strange ...[Stack level too deep] !

Update your rubygems and the problem will gone away. To update gems launch in console: "gem update --system"

0

I am having a terrible time trying to update gems with version 3.2.3 of RubyMine.

I'm in Settings->Update Gems and it loads nothing and just times out.  I have also been having the same problem from the command line.

Is there something wrong with the repositories?

Are the URLs in the "Manage URLs" dialog parsed in the order they appear in the dialog?  If so, we need a way to reorder them like some up/down arrows.  The two that are there by default don't seem to be active and it's using "rubyorg" according to the dialog.

I have already run the command "gem update --system" followed by "update_gems".   If I try to run it again, I get a message telling me that I have the latest.

So after waiting for a long time, I get a "Failed to install gems" trying to update to "rails 3.1.0.rc5".  "Following getms were not installed:  rails (3.1.0.rc5):  While executing gem ... (Gem::RemoteFetcher::FetchError) too many connection resets (http://production.cf.rubygems.org/gems/builder-3.0.0.gem).

0

Hi,

Thanks! Now  the listbox with the gem is filled.


Eddy

0

I reinstalled RubyMine. It is now showing wxRuby in the installed gems list. But when I try to run this sample wxRuby code, it displays error:

require "wx"
include Wx
# a new class which derives from the Wx::App class
class HelloWorld < App
   # we're defining what the application is going to do when it starts
   def on_init
     # it's going to make a frame entitled "Hello World"
     helloframe = Frame.new(nil, -1, "Hello World")
     # it's going to put the text "Hello World" in that frame
     StaticText.new(helloframe,-1,"Hello World")
     # and then it's going to make the window appear
     helloframe.show()
   end
end
# and this line makes it actually do it!
HelloWorld.new.main_loop


Error:

/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/RubystRohit/RubymineProjects/rubystockist/SelectCompany
/home/
RubystRohit/RubymineProjects/rubystockist/SelectCompany:1:in `require': no such file to load -- wx (LoadError)
    from /home/
RubystRohit/RubymineProjects/rubystockist/SelectCompany:1
    from -e:1:in `load'
    from -e:1

Process finished with exit code 1

0

Please sign in to leave a comment.