Does wxRuby run with Ruby 1.9.2 - ruby

I am investigating cross-platform GUI toolkits with Ruby bindings.
wxRuby appears to be a pretty good one, but I am wondering if it has bindings for Ruby 1.9.2.

It does work with 1.9.2, but you have to install it this way
gem install wxruby-ruby19
Otherwise, it will not work on 1.9.2. I'm on 1.9.2 and it took me quite awhile to figure that out how to get it installed correctly. Anyways, I have used it and think that it is pretty good, although I had not used any other GUI frameworks in Ruby.

Related

Why does requiring 'watir-webdriver' in my macruby application in xcode cause this error?

I have installed watir-webdriver via macgem in root and in user, I have required rubygems and included /Library/Frameworks recursively in my framework search path in build settings for this project.
require 'rubygems' runs without a problem
require 'watir-webdriver' returns the error :
Assertion failed: (method_getImplementation(m) == imp), function add_method, file vm.cpp, line 1019.
(lldb)
Im really new to using ruby in xcode can someone explain this?
Thanks
I think I recall hearing something about the version of ruby that ships with the mac OS being um well a kind word would be ancient (1.8 started in 2003.. 1.8.7 in 2008, and while it has been patched more recently than that, it's still kinda old.)
Not sure what Apple's reason for not going to a 1.9 version was, but for some reason they seem to like the older stuff.
Most folks I know working on Watir use some flavor of Ruby 1.9 typically 1.9.3 or 1.9.3. Increasingly people are shifting to 2.0, which came out in Feb.
The first thing I would try is getting a more current version or Ruby and see if that eliminates that error. Instructions are found here I'm pretty sure I used RVM when I installed on my 'work' system (a macbook pro). RVM can be pretty handy (such as if you want to experiment with 2.0) so I'd usually recommend using it for folks on a Mac

How to 'Reset' my OS X Ruby on Rails Gems?

I've been playing with various development tools related to Ruby on Rails on OS X Lion, and things are kind of hosed up. I'd like to remove all my gems and re-install them. Is there an easy way to do this?
Maybe you could use the Ruby Version Manager and not have to remove and reinstall all gems.
From the site:
"RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems."

Which Ruby version is preferable?

Is there any reason to use 1.8.7 over 1.9.1 or is it always best to use the latest stable release?
Usually, if you are not maintaining scripts written in older versions, then using the latest will be what i would choose, since there will be bug fixes, new features etc...
1.9.1 but I have run into problems.
If you don't know RVM you should look at that cause you can switch between ruby versions depending on which project or error you are getting.
There are some bugs in 1.9.1 that caused problems installing some gems, and that went away when I switched to 1.9.2, so I'd recommend 1.9.2. I'd also choose 1.9.2 over 1.8.7 for learning since there are some new features in 1.9.2 plus speed improvements.
And definitely, use RVM for your installations. It makes it easy to manage Ruby versions and sets of gems.
If you are starting fresh, I would suggest 1.9.2. There are many nice syntactic features over 1.8. I would go straight to 1.9.2, as I have heard there have been some idiosyncrasies with 1.9.1. Most gems are >= 1.9 ready by now.
I also would recommend RVM (http://rvm.beginrescueend.com/). I would start with your default ruby on your system. Install RVM, the then 'rvm install 1.9.2', and you will be on the right track. RVM has a great IRC and google group, if you need help.
RVM will let you test against all versions of Ruby available. Try 'rvm list known' to get the full list.
MRI Rubies
JRuby
Rubinius
Ruby Enterprise Edition
MacRuby
MagLev
mput
IronRuby
Hope that helps!

Upgrade ruby projects from 1.8.6 to 1.8.7

What steps should I follow to upgrade a Ruby project from 1.8.6 to 1.8.7?
It should be mostly seamless, since it was mostly compatible changes to the api.
Still, check out the list of incompatibilities
If you start using the new methods offered by 1.8.7 (or newer!) but would like to remain compatible with 1.8.6, checkout my backports gem.
There are just method add in ruby 1.8.7 in compare to ruby 1.8.6. So if it's works with 1.8.6 it's works in ruby 1.8.7 too.
But if you are a great test suite, launch it and see if all works.
It's a point release. You shouldn't have to do anything.
hey, read this http://casperfabricius.com/site/2010/01/24/multiple-ruby-versions-with-rvm/
it takes you through the installation and setup of Ruby Version Manager - which makes it really easy to switch between different versions of ruby in linux (and mac I think) - if you are on windows, then use this, it's called pik http://github.com/vertiginous/pik/

query regarding Ruby

I am a fresher as far as Ruby is concerned. i worked in PHP for sometime. I was wondering if there is some pakage like LAMP or WAMP as in case of PHP for Ruby too......
If not at least suggest me the best setup or IDE for Ruby
Thanx in advance
There is something like: rubystack, if this is what you are looking for (rails development).
BitNami RubyStack greatly simplifies the development and deployment of Ruby on Rails applications. It includes ready-to-run versions of Apache, MySQL, Ruby and Rails and required dependencies. It can be deployed using a native installer, as a virtual machine or in the cloud.
Netbeans, an IDE coming from the java world has ruby support: http://wiki.netbeans.org/Ruby.
Windows
If you use Windows, the easiest way to get Ruby working is via the RubyInstaller.
If you only want to work on Ruby, Ruby 1.9.1 is your choice. Otherwise, if you want to experiment with Rails, you should try to install Ruby 1.8.7.
There's also a BitNami Ruby stack but it contains much more stuff than Ruby itself. You don't really need Apache or MySQL to work with Ruby on your local machine because you can use Mongrel and SQLite. In this way, you don't have to bother with additional background processes.
Avoid using Ruby 1.8.6. It's old and it's not convenient to start studying with an outdated Ruby version.
Mac OS X
Ruby comes installed by default with Leopard and Show Leopard. If you want a different Ruby version, I suggest to use RVM.
Linux
You can install Ruby by source or with your system package manager.
The Rails framework is a great setup for doing web development, and I would highly recommend RadRails as your IDE or it's base, Aptana.

Resources