RUBY Environment Issue 187 and 193

One of my script is running in my local server version 1.8.7, and not
working in 1.9.3 in the production server. There is another script
previously i worked which is working in both the environments.
please suggest me know how to go ahead with this and make the script
work in the production server?

If i have to install 1.9.3 in the local server, then doesnt it effect
the other scripts and do i need to uninstall 1.8.7 and install 1.9.3 or
is there any tool to manage both the versions.

Please help me out am confused

Well, there are some differences in the Ruby language between 187 and
193. As always, if you are write code which is supposed to run on two
different language versions, you have two choices: Restrict your code to
the common subset of those versions, or write the affected part twice,
each one taylored to the respective version. Note that you can query the
Ruby version at runtime.

Ronald F. wrote in post #1184750:

Well, there are some differences in the Ruby language between 187 and
193. As always, if you are write code which is supposed to run on two
different language versions, you have two choices: Restrict your code to
the common subset of those versions, or write the affected part twice,
each one taylored to the respective version. Note that you can query the
Ruby version at runtime.

Thanks Ronald,
Yes the ruby version at runtime for the command: C:\Ruby187\bin\ruby.exe
-I C:\Ruby187\lib
has worked for me.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs