[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Problem with "require"

Markus

10/25/2004 7:58:00 PM

How odd. Perhaps a path thing? Are there multiple (different)
copies of RDForm on you system? Or maybe permissions. What happens if
you require a file that apache can't access? Does it complain?

-- Markus


On Sat, 2004-10-23 at 15:46, Ã?tienne Brouillard wrote:
> Hi!
>
> I'm begining with eRuby and I have a difficulty with a chunk of my code. I
> have my index.rhtml wich contains a require, a .rb that is located in
> Ressources/Ruby/RDForm.rb. When I run index.rhtml through eRuby, it goes
> through perfectly fine but when I try to access it through Apache, I get
> this error:
>
>
> <-- Error -->
> [Sat Oct 23 18:31:18 2004] [error] mod_ruby:
> /home/http/godsiocorp/index.rhtml:8: uninitialized constant
> #<Module:0x4120f22c>::RDForm (NameError)
> [Sat Oct 23 18:31:18 2004] [error] mod_ruby: from (eval):117
> [Sat Oct 23 18:31:18 2004] [error] mod_ruby: from
> /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `eval_string_wrap'
> [Sat Oct 23 18:31:18 2004] [error] mod_ruby: from
> /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `run'
> [Sat Oct 23 18:31:18 2004] [error] mod_ruby: from
> /usr/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler'
>
> Here is the chunk in index.rhtml that causes some problems :
>
> <-- index.rhtml -->
> <%
> #Requires
> require 'Ressources/Ruby/RDForm'
>
> #begin
> form = RDForm.new("mainForm", "main", "POST", "index.rhtml")
>
> %>
>
> And RDForm.rb looks like that (in part)
>
> <-- RDForm.rb -->
> require 'Ressources/Ruby/RDIncludes.rb'
>
> class RDForm
>
> def initialize(m_id, m_name, m_method, m_action)
> @id = m_id
> @name = m_name
> @method = m_method
> @action = m_action
> @hiddenFields = Array.new()
> end
>
> def id=(n_id)
> @id = n_id
> end
>
> def name=(n_name)
> @name = n_name
> end
>
> def method=(n_method)
> @method = n_method
> end
>
> def action=(n_action)
> @action = n_action
> end
> ...
>
> Apache 2, ruby 1.8.2, Gentoo Linux.
>
> Many thanks in advance!
>
> Ã?tienne Brouillard
>



2 Answers

conwaycaine

5/30/2008 1:20:00 PM

0


"Cynic" <cynic_999@yahoo.co.uk> wrote in message
news:hqmv34tnb49lml14gk5ldpdo6knuqe0pld@4ax.com...
> On Thu, 29 May 2008 18:47:01 -0400, "conwaycaine"
> <conwaycaine@bellsouth.net> wrote:
>
>>>>>>>>Go direct to the Source.
>>>
>>>>>>> I have. I found no evidence whatsoever.
>>>
>>>>>>There are none so blind as those who WILL not see.
>>>
>>>>> What do you believe I should see?
>>>
>>>>I believe you should see what is there for you to see, not what I
>>>>believe
>>>>you should see.
>>>
>>> Seems like you don't believe that there is anything in particular for
>>> me to see. Which accords perfectly with my observation.
>>
>>Oh yes, there is something for you to see.
>>But first learn how to read an email correctly.
>
> I have not erceived an email from yourself. Perhaps you could re-send
> it?

True.
You did not.
But you did, intentionally or unintentionally, misconstrue my Newsgroup
posting.

I wrote "I believe you should see what is there for you to see, not what I
believe you should see."
You wrote " Seems like you don't believe that there is anything in
particular for me to see."

BTW, your syntax is confusing here.
Do you mean to say that I do believe there is something particular for you
to see?

(You are really doc Jenkins in disguise, aren't you?)








Jeffrey Hamilton

5/31/2008 5:11:00 AM

0


"Mike_B" <usenet@kicakhosts.co.uk> wrote in message
news:1bdt34hfc0bcq8omnfocpaqd07b3rv14mu@4ax.com...
> On Thu, 29 May 2008 00:25:56 -0400, "Jeffrey Hamilton"
> <bberesford@cogeco.ca> wrote:
>
>>Jeeze Adam I was always taught it was _only_ two of each kind.
>>Who knew.
>>
>> cheers....Jeff
>
>
> Genesis 7
> 1 The LORD then said to Noah, "Go into the ark, you and your whole
> family, because I have found you righteous in this generation. 2 Take
> with you seven [a] of every kind of clean animal, a male and its mate,
> and two of every kind of unclean animal, a male and its mate, 3 and
> also seven of every kind of bird, male and female, to keep their
> various kinds alive throughout the earth.
>
>
> 2 of each kind? The Bible seems to suggest 7 of each kind.
>

Well that's certainly going to screw up the seating arrangement.

cheers.....Jeff

> --
> Mike_B