query regarding Ruby - 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.

Related

Configuring Apache with Ruby on rails on Windows

I have installed Rubyinstaller as i intend to work with Ruby on Rails on Windows. I have used Apache HTTP in several web projects previously and i am very familiar with it.
Is there any tutorial that i should follow to configure it properly with Ruby? At the moment i have found this guide, but it's for MacOS ONLY and i think that i would have got some problems.
Regards
I recommend this:
https://www.phusionpassenger.com/library/walkthroughs/start/
I've used it, and actually had windows based Ruby on Rails IN PRODUCTION!

Can I use Ruby with Shoes for GUI for a multiple choice test app?

I'm trying to make a simple multiple choice question app. Is this possible on ruby?
I've tried using shoes but I don't know how to create multiple classes and a GUI that uses them.
I'm also trying to connect all of this to a database.
I'm having trouble in understanding how to connect all of this together.
According to the comments the main problem seems to be with using the mysql gem part.
Gem usage depends on the version of shoes you are using. For green_shoes you should be good with the standard gems, but it is unmaintained. Shoes 3.1 has problems with gems that have C extensions (such as mysql). Shoes 3.2 should work. With Shoes4 you can't install the normal Ruby gems with C extensions as it uses JRuby and C extension support in JRuby is disabled. You have to use different gems to connect to the database, functionality is the same. A starting point might be activerecord-jdbc.

Is there a way to deploy Ruby on Rails on a Windows Server?

We've been trying many different ways to deploy Ruby on Rails on a Windows Server but to no avail. Can someone teach us or at least send me a link of instruction how to deploy on a windows server.
By the way we use MS SQL and Rails 4
Thanks!
RailsInstaller is the quickest way to go from zero to developing Ruby on Rails applications. Whether you're on Windows or Mac, RailsInstaller has you covered.
http://railsinstaller.org/
PS. Be advised it is Ruby 1.9

Can I switch versions of Ruby dynamically using RVM?

I'm working on building a GUI for my checkers implementation. I'm utilizing a GUI framework that only works with Ruby 1.8, yet my game engine, which I have packaged as a gem, only works with Ruby 1.9.
I can't change the code for the GUI framework and reworking my game engine to make it compatible with 1.8 is undesirable, to say the least.
I'm using RVM though, and it looks like you can write RVM scripts to change Ruby versions on the fly.
Does anyone have any experience with that or what the script might look like?
You could run it in two processes. Give the GUI a 1.8 process and talk to it via a shared db or an API on the other side. That's how I'd do it. The good part about that is you can have on online version of your game as well because other clients will be able to talk to it as well.
You can't run one app with two versions of Ruby. How do you imagine this?
RVM has an ability to automatically change current ruby when you cd into a directory. Just create in that directory a file called .rvmrc with content like
rvm use 1.8.7

If I have jRuby on Rails installed can I use only Ruby?

What I mean by this is if I install jRuby on Rails, can I use only the ruby language to build my application? I wanted to install my rails application with jRuby in case I wanted to use Java in the future, though I don't need it now. Or do I not understand? Is jRuby ruby that has access to java libraries?
yes, jruby is ruby (your ruby scripts need no modification to run under jruby). in addition, it has full access to java libraries - check out the wiki for how easy it is to integrate a java class or library into your ruby code.
The others have answered your direct question. I just want to say that I've been using jruby full time at work for the past 6 months and it's great. Deploying a rails app with the glassfish gem is very easy and jruby performs better than MRI ruby 1.8.x.
I've seen no real downside after 6 months other than the fact that we can't use gems that have pieces written in C. However, we've taken a C library and created a gem using FFI and it wasn't too much trouble.
It's also really easy to speed up your app by writing a few key pieces in java (which is easier t work with than C).

Resources