You are not logged in.

#1 2006-05-03 20:40:03

rieger
Member
From: Hilversum, The Netherlands
Registered: 2006-05-03
Posts: 18

environment variable not found (GRAILS_HOME)

Hi,

Just new to Arch but I like it bigtime  big_smile

I have a question, I am overlooking something probably but this is the problem.

I installed Grails (grails.org), and set the environment variables in my .bashrc:

alias ls='ls --color=auto'
PS1='[u@h W]$ '

test -n "$DISPLAY" && export TERM=xterm-color

JAVA_HOME=/opt/java
GROOVY_HOME=/opt/groovy-1.0-jsr-05
GRAILS_HOME=/opt/grails-0.1

PATH=$PATH:$JAVA_HOME/bin:$GROOVY_HOME/bin:$GRAILS_HOME/bin

however, when I try to start grails, I'll get:

Error: GRAILS_HOME is not defined
Please define GRAIL_HOME and start Grails again

echo $GRAILS_HOME gives the correct answer.

(it's not that GRAIL_HOME (no 'S' here) is missing I think, this is a comment error in the grails script is my guess)

very weird....

Offline

#2 2006-05-05 04:39:30

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: environment variable not found (GRAILS_HOME)

try adding export before the var assignment.....

export GRAILS_HOME=/opt/grails-0.1

the export tells bash to pass the variable on to the environment of any future run programs.

"man export" for more info.


Hope this helps.

--Todd

Offline

#3 2006-05-11 21:20:01

rieger
Member
From: Hilversum, The Netherlands
Registered: 2006-05-03
Posts: 18

Re: environment variable not found (GRAILS_HOME)

thanks.

I'm a little further, the path can now be found correctly (I installed Grails in a subdir of my HOME btw), but no I'll get this:

[alex@myhost ~]$ grails
bash: /home/alex/prg/grails-0.1/bin/grails: Permission denied

This is strange, I installed Groovy and Java in /opt, and if I call groovy (which depens on Java) as a user, everything works fine. However somewhere in the grails script it looks like a reference is made to something that is not allowed, but how can that be if I installed Grails as my average user in it's own directory.

weird....

Offline

#4 2006-05-12 01:01:57

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: environment variable not found (GRAILS_HOME)

You have to make the file executable....

chmod +x  /home/alex/prg/grails-0.1/bin/grails

Offline

#5 2006-05-12 06:30:12

rieger
Member
From: Hilversum, The Netherlands
Registered: 2006-05-03
Posts: 18

Re: environment variable not found (GRAILS_HOME)

is it that easy? :oops:

I'll try it tonight, thanks.

-shouldn't this be executable after unpacking?-

Offline

#6 2006-05-13 10:37:50

rieger
Member
From: Hilversum, The Netherlands
Registered: 2006-05-03
Posts: 18

Re: environment variable not found (GRAILS_HOME)

mmm ,one step further and back again:

[alex@myhost ~]$ echo $GRAILS_HOME
/home/alex/prg/grails-0.1
[alex@myhost ~]$ grails
Error: GRAILS_HOME is not defined
Please define GRAIL_HOME and start Grails again
[alex@myhost ~]$

that's just weird according to me...

Offline

Board footer

Powered by FluxBB