Is older Ruby versions "looser" than new ones?

We are trying to get a pre-existing ruby on rails site up and running
(we just got these files sent to us).

We are new to ruby so we have a new install (we’re running 1.8.6,
patch level 0).

We have already had to update the code in this app from ‘require_gem’
to ‘gem’ and now we are getting variable not initialized errors. We’re
thinking we’re running a different version of Ruby than where this
site was hosted before…

Was there a previous ruby version that was by default was loose and
allowed you ‘spring to life’ variables? Is there a way to tell ruby to
be loose about its variable declaration?

thanks for the help.

SuperRunt wrote:

Was there a previous ruby version that was by default was loose and
allowed you ‘spring to life’ variables? Is there a way to tell ruby to
be loose about its variable declaration?

http://groups.google.ca/group/rubyonrails-talk/browse_thread/thread/b17aa16b770cf025/59ac13552bab9c09?lnk=raot

In short:

require_gem was used to both define a version of a gem and require it.

This is now deprecated.

To define the version of a gem you use ‘gem’.

To actually require the file you need to use ‘require’.

If you want the latest version ‘require’ will be enough.

Stefan

What are the warnings that you’re receiving? It’s probable that
you’re running ruby with the -w switch on. Rails wasn’t written to be
-w clean, so make sure you take that switch off. If you can’t control
the command line switch, you can force it by setting $VERBOSE to nil
or false in your config/environment.rb.

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