1

I have developed a simple ruby application without any MVC, and runs on command prompt using ruby 1.9.2 . It also has a Gemfile. I want this application to run on machines running ruby 1.8.7 and 1.9.3 as well. So how can I set it right for multiple environments.

Please Guide.

Thanks

Metal
  • 205
  • 3
  • 11

1 Answers1

0

At first you have to make sure that your code is compatible with the syntax of ruby 1.8 and 1.9 https://stackoverflow.com/a/21621/335523

Then make sure that the gems you used support both versions of ruby. (Read through their github page or documentation)

If you are using gems that do not suport both versions of ruby you have to find alternative gems that provide the same functionality in each environment and specify them in your gem file like this:

gem 'rcov', :platforms => :ruby_18
gem 'simplecov', :platforms => :ruby_19
Community
  • 1
  • 1
Hugo
  • 12,334
  • 6
  • 30
  • 36