From: Josh Cheek Date: 2013-04-01T21:11:44+09:00 Subject: Re: uninitialized constant ActiveRecord (NameError) --047d7b343800f8314504d94b858d Content-Type: text/plain; charset=ISO-8859-1 On Mon, Apr 1, 2013 at 4:13 AM, jonathan kav wrote: > ok > I tried added active records as you said but i think that i am missing > the original circle.rb file so i have only half of the script. > this is an old script that was written a few years ago. i will try to > get a hold on it. > if i use the gem it doesnt work. > > require 'active_record' > require 'ruby-debug' > require 'circle' > > first_circle=Circle.new() > @number_of_rounds=1 > primaries=Array.new > @prime_numbers=Hash.new > @prime_numbers[1]=0 > #@prime_numbers > > and it goes on.... > > i get this message > > primes.rb:7:in `
': undefined method `new' for Circle:Module > (NoMethodError) > > so you are right it is a missing script. > > thank you for your help. > Jonathan > > -- > Posted via http://www.ruby-forum.com/. > > You need to look in the directory of the script and see if there is a file in there named circle.rb The Circle gem is a red herring, it was written in mid 2012, and did not exist several years ago. This code isn't going to work if you don't have the other half of the script. -Josh --047d7b343800f8314504d94b858d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Apr 1, 2013 at 4:13 AM, jonathan kav <lists@ruby-forum.com= > wrote:
ok
I tried added active records as you said but i think that i am missing
the original circle.rb file so i have only half of the script.
this is an old script that was written a few years ago. i will try to
get a hold on it.
if i use the gem it doesnt work.

require 'active_record'
require 'ruby-debug'
require 'circle'

first_circle=3DCircle.new()
@number_of_rounds=3D1
primaries=3DArray.new
@prime_numbers=3DHash.new
@prime_numbers[1]=3D0
#@prime_numbers

=A0and it goes on....

=A0i get this message

primes.rb:7:in `<main>': undefined method `new' for Circle:Mo= dule
(NoMethodError)

so you are right it is a missing script.

thank you for your help.
Jonathan

You need to look in the directory o= f the script and see if there is a file in there named circle.rb
=
The Circle gem is a red herring, it was written in mid 2012,= and did not exist several years ago.

This code isn't going to work if you don't have= the other half of the script.

-Josh
--047d7b343800f8314504d94b858d--