[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

require not working on server

Jeff Pritchard

8/18/2008 8:54:00 PM

I'm developing on a Mac and deploying to a RHEL4 linux server. For some
reason while "require" returns a boolean on the Mac, it is returning an
empty array "[]" on the server. Where can I find the code for "require"
and what makes it return an empty array instead of a boolean?

This seems to be only in the Rails app I'm working on. If I do this
same sequence in IRB, it works as expected on both machines.

Thanks much for any ideas/assistance...

jp



On the mac:
JP-iMac:synergy jeffpritchard$ script/console
Loading development environment (Rails 2.1.0)
>> require 'rubygems'
=> false
>> require 'redcloth'
=> true
>> RedCloth.new("fred").to_html
=> "<p>fred</p>"
>> quit


On the server:
[foo@bar current]# script/console
Loading development environment (Rails 2.1.0)
>> require 'rubygems'
=> []
>> require 'redcloth'
=> []
>> RedCloth.new("fred").to_html
NameError: uninitialized constant RedCloth::TextileDoc
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:275:in
`load_missing_constant'
from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in
`const_missing'
from
/usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.2/lib/case_sensitive_require/../redcloth.rb:17:in
`new'
from (irb):3
>>
--
Posted via http://www.ruby-....

10 Answers

Kyle Schmitt

8/18/2008 9:47:00 PM

0

On Mon, Aug 18, 2008 at 3:53 PM, Jeff Pritchard <jp@jeffpritchard.com> wrote:
> I'm developing on a Mac and deploying to a RHEL4 linux server. For some
> reason while "require" returns a boolean on the Mac, it is returning an
> empty array "[]" on the server. Where can I find the code for "require"
> and what makes it return an empty array instead of a boolean?
>
> This seems to be only in the Rails app I'm working on. If I do this
> same sequence in IRB, it works as expected on both machines.
>
> Thanks much for any ideas/assistance...
>
> jp
>
>
>

RHEL4 is slightly...dated
Are you sure you've got the same versions of ruby on both platforms?

Jeff Pritchard

8/18/2008 10:25:00 PM

0

Kyle Schmitt wrote:
> On Mon, Aug 18, 2008 at 3:53 PM, Jeff Pritchard <jp@jeffpritchard.com>
> wrote:
>> jp
>>
>>
>>
>
> RHEL4 is slightly...dated
> Are you sure you've got the same versions of ruby on both platforms?

Yes, I have been updating ruby and rails as time went on. Both at 1.8.6
for ruby. I know there is a 1.8.7, but some say it is not good with
rails right now.

Also, I discovered that I had several older versions of ruby on the
machine and have extirpated them all now. That didn't fix it though.
;(

thanks,
jp
--
Posted via http://www.ruby-....

Jeff Pritchard

8/18/2008 10:45:00 PM

0

Jeff Pritchard wrote:
Even if you don't have an idea to share, can somebody fill me in on how
rubygems "works"?
Does the "require 'rubygems'" bring in some code that effectively
replaces the ruby 'require'?

I see a bunch of stuff in "boot.rb" in the rails app that relates to
rubygems. Does this replace the ruby require mechanism as soon as the
app starts up? I have the latest rubygems installed. It looks almost
as though something must be going wrong with that.


>
> thanks,
> jp

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

Kyle Schmitt

8/19/2008 1:08:00 PM

0

On Mon, Aug 18, 2008 at 5:45 PM, Jeff Pritchard <jp@jeffpritchard.com> wrote:
> Jeff Pritchard wrote:
> Even if you don't have an idea to share, can somebody fill me in on how
> rubygems "works"?
> Does the "require 'rubygems'" bring in some code that effectively
> replaces the ruby 'require'?

Well, more or less, I don't know. But I know _some_ of it.
When you go back to 1.8.5, you needed to
require 'rubygems'
#before you required a gem
require 'camping'

I think (for ready-made gems) mostly what it does is add path
information, but it also sets up logic to crawl the dependencies of a
gem, so it can load the libraries the gem requires, IFF they happen to
also be gems.

I'm pretty sure when 1.8.6 came out, however, you no longer needed to
require rubygems. You could just:

require 'camping'

--Kyle

Patrick

8/10/2012 12:38:00 PM

0

"Dakota" <markp@NOSPAMmail.com> wrote in message
news:k02sre$ral$1@dont-email.me...
> On 8/9/2012 7:54 PM, Irreverend Dave wrote:
>> duke <duckgumbo32@cox.net> wrote:
>>
>>> On Thu, 9 Aug 2012 03:45:42 +0000 (UTC), Irreverend Dave
>>> <reverend_dave@ministerpants.com> wrote:
>>>
>>>> "Patrick" <barker_pb@erinot.com> wrote:
>>>>
>>>>> "Dakota" <markp@NOSPAMmail.com> wrote >
>>>>>> Perhaps times have changed. I haven't darkened the door of a
>>>>>> Catholic church in decades but the last time I attended a mass, the
>>>>>> priest was up on stage performing the rituals, showing off the
>>>>>> golden cup, and prompting the crowd to respond to various magical
>>>>>> incantations. Along with the folding hands in prayer thing, there
>>>>>> was a hand-shaking ritual among the crowd which had been added
>>>>>> after I abandoned the nonsense. Plus a bunch of the same old
>>>>>> calisthenics. Stand up. Kneel down. Sit down. Repeat as directed.
>>>>>> Go down on one knee before entering or leaving your bench. Kneel at
>>>>>> the rail to eat the flesh of the guy hanging from the cross above
>>>>>> the altar. The priest got to drink all the blood though. (Everybody
>>>>>> knows it's just a wafer and some wine but the church insists is
>>>>>> really flesh and blood. Perhaps duke can explain why.) When I was
>>>>>> an altar boy, the neatest thing was the monstrance. I don't need to
>>>>>> tell you what we called it. High mass was fun if you got to carry
>>>>>> the thurible. Swinging it on its chain and smelling the incense was
>>>>>> a pretty heady experience for a little kid. There's an older kid
>>>>>> swinging one at the link. I hope they still use those props. They
>>>>>> made being an altar boy fun back in the day. Memorizing the Latin
>>>>>> bits was a pain though. I was fortunate that my church didn't have
>>>>>> any of the priests who liked having their fun with altar boys. But
>>>>>> like duke says, that's all over now. There hasn't been a conviction
>>>>>> in the USA since, um, last Thursday in KC.
>>>>>
>>>>> How old are you?
>>>>
>>>> Obviously old enough to have been an altar boy back when the mass was
>>>> done in Latin.
>>>
>>> Which means you learned nothing.
>>
>> Care to explain what you mean by this Duke, or will you just run away?
>>
> I'm 65?.

Now I understand.
You are SOOOO much older than me.
I'll only be 64 next month.


Virgil

8/10/2012 9:50:00 PM

0

In article <1st92899hd76siromgd7eq1mkm30v1fvkh@4ax.com>,
duke <duckgumbo32@cox.net> wrote:

> You showed your ass above when you barked up the crap about what goes on at
> Holy Mass.

Well what sort of crap DOES go on?


***************************************

Obama is on the common people's side.
Romney is on the wealthy people's side.
Whose side will you be on?

***************************************
--


Irreverend Dave

8/11/2012 2:58:00 AM

0

duke <duckgumbo32@cox.net> wrote:

> On Fri, 10 Aug 2012 00:54:49 +0000 (UTC), Irreverend Dave
> <reverend_dave@ministerpants.com> wrote:
>
>>duke <duckgumbo32@cox.net> wrote:
>>
>>> On Thu, 9 Aug 2012 03:45:42 +0000 (UTC), Irreverend Dave
>>> <reverend_dave@ministerpants.com> wrote:
>>>
>>>>"Patrick" <barker_pb@erinot.com> wrote:
>>>>
>>>>> "Dakota" <markp@NOSPAMmail.com> wrote >
>>>>>> Perhaps times have changed. I haven't darkened the door of a
>>>>>> Catholic church in decades but the last time I attended a mass,
>>>>>> the priest was up on stage performing the rituals, showing off
>>>>>> the golden cup, and prompting the crowd to respond to various
>>>>>> magical incantations. Along with the folding hands in prayer
>>>>>> thing, there was a hand-shaking ritual among the crowd which had
>>>>>> been added after I abandoned the nonsense. Plus a bunch of the
>>>>>> same old calisthenics. Stand up. Kneel down. Sit down. Repeat as
>>>>>> directed. Go down on one knee before entering or leaving your
>>>>>> bench. Kneel at the rail to eat the flesh of the guy hanging from
>>>>>> the cross above the altar. The priest got to drink all the blood
>>>>>> though. (Everybody knows it's just a wafer and some wine but the
>>>>>> church insists is really flesh and blood. Perhaps duke can
>>>>>> explain why.) When I was an altar boy, the neatest thing was the
>>>>>> monstrance. I don't need to tell you what we called it. High mass
>>>>>> was fun if you got to carry the thurible. Swinging it on its
>>>>>> chain and smelling the incense was a pretty heady experience for
>>>>>> a little kid. There's an older kid swinging one at the link. I
>>>>>> hope they still use those props. They made being an altar boy fun
>>>>>> back in the day. Memorizing the Latin bits was a pain though. I
>>>>>> was fortunate that my church didn't have any of the priests who
>>>>>> liked having their fun with altar boys. But like duke says,
>>>>>> that's all over now. There hasn't been a conviction in the USA
>>>>>> since, um, last Thursday in KC.
>>>>>
>>>>> How old are you?
>>>>
>>>>Obviously old enough to have been an altar boy back when the mass
>>>>was done in Latin.
>>>
>>> Which means you learned nothing.
>>
>>Care to explain what you mean by this Duke, or will you just run away?
>
> You showed your ass above when you barked up the crap about what goes
> on at Holy Mass.
>

What crap was that Duke? Try being a little less vague.


--
"Theology is not a source of genuine knowledge and therefore is not a
science. Reason and religion are thus at odds with each other."
- William Lane Craig

Irreverend Dave

8/11/2012 2:59:00 AM

0

"Patrick" <barker_pb@erinot.com> wrote:

> "Dakota" <markp@NOSPAMmail.com> wrote in message
> news:k02sre$ral$1@dont-email.me...
>> On 8/9/2012 7:54 PM, Irreverend Dave wrote:
>>> duke <duckgumbo32@cox.net> wrote:
>>>
>>>> On Thu, 9 Aug 2012 03:45:42 +0000 (UTC), Irreverend Dave
>>>> <reverend_dave@ministerpants.com> wrote:
>>>>
>>>>> "Patrick" <barker_pb@erinot.com> wrote:
>>>>>
>>>>>> "Dakota" <markp@NOSPAMmail.com> wrote >
>>>>>>> Perhaps times have changed. I haven't darkened the door of a
>>>>>>> Catholic church in decades but the last time I attended a mass,
>>>>>>> the priest was up on stage performing the rituals, showing off
>>>>>>> the golden cup, and prompting the crowd to respond to various
>>>>>>> magical incantations. Along with the folding hands in prayer
>>>>>>> thing, there was a hand-shaking ritual among the crowd which had
>>>>>>> been added after I abandoned the nonsense. Plus a bunch of the
>>>>>>> same old calisthenics. Stand up. Kneel down. Sit down. Repeat as
>>>>>>> directed. Go down on one knee before entering or leaving your
>>>>>>> bench. Kneel at the rail to eat the flesh of the guy hanging
>>>>>>> from the cross above the altar. The priest got to drink all the
>>>>>>> blood though. (Everybody knows it's just a wafer and some wine
>>>>>>> but the church insists is really flesh and blood. Perhaps duke
>>>>>>> can explain why.) When I was an altar boy, the neatest thing was
>>>>>>> the monstrance. I don't need to tell you what we called it. High
>>>>>>> mass was fun if you got to carry the thurible. Swinging it on
>>>>>>> its chain and smelling the incense was a pretty heady experience
>>>>>>> for a little kid. There's an older kid swinging one at the link.
>>>>>>> I hope they still use those props. They made being an altar boy
>>>>>>> fun back in the day. Memorizing the Latin bits was a pain
>>>>>>> though. I was fortunate that my church didn't have any of the
>>>>>>> priests who liked having their fun with altar boys. But
>>>>>>> like duke says, that's all over now. There hasn't been a
>>>>>>> conviction in the USA since, um, last Thursday in KC.
>>>>>>
>>>>>> How old are you?
>>>>>
>>>>> Obviously old enough to have been an altar boy back when the mass
>>>>> was done in Latin.
>>>>
>>>> Which means you learned nothing.
>>>
>>> Care to explain what you mean by this Duke, or will you just run
>>> away?
>>>
>> I'm 65?.
>
> Now I understand.
> You are SOOOO much older than me.
> I'll only be 64 next month.
>
>

So you'd be old enough to remember the Latin mass as well.


--
"Theology is not a source of genuine knowledge and therefore is not a
science. Reason and religion are thus at odds with each other." -
William Lane Craig

Irreverend Dave

8/11/2012 3:13:00 AM

0

duke <duckgumbo32@cox.net> wrote:

> On Thu, 9 Aug 2012 03:46:20 +0000 (UTC), Irreverend Dave
> <reverend_dave@ministerpants.com> wrote:
>
>>duke <duckgumbo32@cox.net> wrote:
>>
>>> On Tue, 07 Aug 2012 13:56:15 -0500, Dakota <markp@NOSPAMmail.com>
>>> wrote:
>>>
>>>>On 8/7/2012 1:20 PM, Virgil wrote:
>>>>> In article <lls128htiabidv4vqh9eemkkvhu97uotmm@4ax.com>,
>>>>> duke <duckgumbo32@cox.net> wrote:
>>>>>
>>>>>>> I also know that priests say mass and that you and the rest of
>>>>>>> the sheep make responses and hand gestures at the appropriate
>>>>>>> times.
>>>>>>
>>>>>> No - priests don't say mass. And what's this crap about responses
>>>>>> and hand gestures?
>>>>>
>>>>> Then who does?
>>>>>
>>>>> Or is it all just myth?
>>>>>
>>>>Perhaps times have changed. I haven't darkened the door of a
>>>>Catholic church in decades but the last time I attended a mass, the
>>>>priest was up on stage performing the rituals, showing off the
>>>>golden cup, and prompting the crowd to respond to various magical
>>>>incantations.
>>>
>>> Ok, you just showed your ass.
>>
>>More like he spanked yours!
>
> With an understanding like his, he's welcome not to darken our doors.

Perhaps then you'd care to describe exactly what goes on at mass, just
to prove you know what you're talking about.


--
"Theology is not a source of genuine knowledge and therefore is not a
science. Reason and religion are thus at odds with each other." -
William Lane Craig

Irreverend Dave

8/11/2012 3:26:00 AM

0

duke <duckgumbo32@cox.net> wrote:

> On Thu, 9 Aug 2012 03:36:44 +0000 (UTC), Irreverend Dave
> <reverend_dave@ministerpants.com> wrote:
>
>>Dakota <markp@NOSPAMmail.com> wrote:
>>
>>> On 8/7/2012 1:20 PM, Virgil wrote:
>>>> In article <lls128htiabidv4vqh9eemkkvhu97uotmm@4ax.com>,
>>>> duke <duckgumbo32@cox.net> wrote:
>>>>
>>>>>> I also know that priests say mass and that you and the rest of
>>>>>> the sheep make responses and hand gestures at the appropriate
>>>>>> times.
>>>>>
>>>>> No - priests don't say mass. And what's this crap about responses
>>>>> and hand gestures?
>>>>
>>>> Then who does?
>>>>
>>>> Or is it all just myth?
>>>>
>>> Perhaps times have changed. I haven't darkened the door of a
>>> Catholic church in decades but the last time I attended a mass, the
>>> priest was up on stage performing the rituals, showing off the
>>> golden cup, and prompting the crowd to respond to various magical
>>> incantations. Along with the folding hands in prayer thing, there
>>> was a hand-shaking ritual among the crowd which had been added after
>>> I abandoned the nonsense. Plus a bunch of the same old calisthenics.
>>> Stand up. Kneel down. Sit down. Repeat as directed. Go down on one
>>> knee before entering or leaving your bench. Kneel at the rail to eat
>>> the flesh of the guy hanging from the cross above the altar. The
>>> priest got to drink all the blood though. (Everybody knows it's just
>>> a wafer and some wine but the church insists is really flesh and
>>> blood. Perhaps duke can explain why.)
>
>>Seems you had no difficulty at all understanding what I meant by
>>responses and hand gestures. So why does Duke?
>
> Becasue you departed leaving full doubt about your words. Based on
> your demonstrated personal qualities, you could have meant the Priest
> was finger waving to the congregation.
>
>>The hand gesture I was thinking of was the sign of the cross. The few
>>times I've attended a Catholic mass (weddings, funerals, memorial
>>masses and a couple of times with friends just for shits and giggles)
>>I noticed that after the priest intoned certain words the sheeple
>>would frantically cross themselves.
>
> Frantically?? I think you clearly had your own hands in the shit.
> The sign of the Cross is a most reverent act generally reserved for
> blessings at Mass, typically at the start and end of the Mass.

I observed what I observed Duke, and these people made the sign of the
cross as quick as lightning.

>
> Listening to unlearned fools like you are most enjoyable moments for
> me. You're sooooooooo easy to correct.

Try blowing smoke up somebody else's ass Duke.


--
"Theology is not a source of genuine knowledge and therefore is not a
science. Reason and religion are thus at odds with each other."
- William Lane Craig