Sunday, March 13, 2011

[Rails] Error: cannot load such file

Hello,

I am again looking for some guidance as an inexperienced programmer. I
appreciate the help. I would like to run a number of ruby files from
within rails. They are all different, but return information in a hash
(gen_output) in a standard format that my model in rails needs to use.
I am storing the files in a folder in "lib". The files can be as basic
as 1+2+3, with 3 being returned in the hash.

This is in my model:
require 'lib/generators/parks_bielkowski_test.rb'

formatted = {
:complete_question => gen_output["complete_question"]
}
formatted

I get this error:
cannot load such file -- lib/generators/parks_bielkowski_test.rb

Do I need to do something to the files themselves?

Thanks
DC

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate