Integrating wxRuby into RubyMine Follow Rubyist Rohit Created August 04, 2011 18:48 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?
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
"Gem urls" are urls to gem repositories, not single gems
wxRuby gem is not present in my "Install gems.." dialog. I double-checked it, it is not there.
Probably it is because you replaced default gem urls with smt else. Which ursl are shown in "gem urls" dialog?
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?
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
if you have a different urls, please use mine and the press 'refresh' button
It seems that the two repositories urls (http://gems.github.com, http://gems.rubyonrails.org) are no more actif.....
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.
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 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
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
:sources => ["http://rubygems.org/", "http://gems.github.com"]
IDE: JetBrains RubyMine 3.2.3, build #RM-107.494
OS: Windows 7 6.1[x86]
RubyMine SDK Environment:
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:/Program Files (x86)/JetBrains/RubyMine 3.2.3/rubystubs19
Sdk Gem paths:
Gems used for 'untitled':
I have also this error when I open a project:
Strange ...[Stack level too deep] !
Update your rubygems and the problem will gone away. To update gems launch in console: "gem update --system"
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).
Thanks! Now the listbox with the gem is filled.
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:
# 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
# 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
# and then it's going to make the window appear
# and this line makes it actually do it!
/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 -e:1:in `load'
Process finished with exit code 1