small medium large xlarge

Generic-user-small
20 Oct 2011, 06:27
Jithin Syam (3 posts)

Hi Guys,

I was going through the Active Record chapter and when I tried to run the sample codes(encrypt.rb) given I am getting the following error. It fails on initial requiring part.

 <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- connect (LoadError)
	from <internal:lib/rubygems/custom_require>:29:in `require'
	from encrypt.rb:10:in `<main>'
 

Not sure I am missing anything. Could anyone please help me with this?

Thanks in advance

Generic-user-small
20 Oct 2011, 08:52
Jithin Syam (3 posts)

I am using Ruby 1.9.2p290 and Rails 3.1.1.rc3 in Ubuntu 11.04.

Please help me with the above issue.

Samr_small_pragsmall
20 Oct 2011, 11:02
Sam Ruby (634 posts)

Replace that line with:

require "./config/environment.rb"

Either that, or create a file named connect.rb with that one line.

Generic-user-small
20 Oct 2011, 11:17
Jithin Syam (3 posts)

Thanks Sam.. It worked… :-)

You must be logged in to comment