shrutiug / yooreeka

Automatically exported from code.google.com/p/yooreeka
0 stars 0 forks source link

Issues running listing 2.1 on Mac OS X #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to run the example in listing 2.1 in the book on Mac OS X.

What is the expected output? What do you see instead?
I would expect the example to work, however, there are a few issues present.

What version of the product are you using? On what operating system?
I am using http://yooreeka.googlecode.com/files/yooreeka-20090517.zip on Mac OS 
X 10.6.2.

Please provide any additional information below.
I have been able to successfully execute the example, however, a few 
modifications were 
necessary to the code.

1. The $IWEB2_HOME/deploy/bin/bsc.sh script looks to have been saved with 
Windows line 
ending (CRLF) instead of the unix line ending character (LF). Running either 
dos2unix or the 
command:

cat bsc.sh | tr -d '\r' > bsc.sh

should fix the issue.

2. The IWEB2_HOME directory is hardcoded in the bsc.sh script. Alternatively, 
this can be 
dynamically inferred from within the script like so:

binDir=`dirname $0`
currDir=`pwd`
cd $binDir/../..
IWEB2_HOME=`pwd`
cd $currDir

If this snip is added to the top of the script, thereby replacing the hardcoded 
IWEB2_HOME=/home/babis/code/iweb2 line, the script should work and be 
executable from any 
directory in the shell as well.

3. The iweb2.home system property is not properly determined on Mac OS X. Since 
the property 
is set in the shell script, it should be safe to just replace the 
implementation for 
iweb2.util.config.IWeb2Config#getHome() with the following:

    public static String getHome() {
        return System.getProperty("iweb2.home", "C:/iWeb2");
    }

Let me know if you need anything further and thanks again for the book and 
associated code.

Original issue reported on code.google.com by opeck...@gmail.com on 17 Dec 2009 at 6:53

GoogleCodeExporter commented 9 years ago
Thank you for those instructions opeckojo! They worked exactly as written [1] 
for me
on Mac OS X 10.6.2 also. This will probably work for Linux as well I suspect.

[1] with one exception. The 'tr' command actually removed the content of the 
file,
but perhaps I had already changed the line feeds in my editor (TextMate) before 
running.

Original comment by robert.g...@gmail.com on 22 Dec 2009 at 9:10

GoogleCodeExporter commented 9 years ago
I've taken the liberty of applying the above changes and creating a Git 
repository on
Github [1]. It should be a bit easier to work with there. Feel free to fork it!

[1] http://github.com/rgravina/yooreeka

(I'm on a flakey internet connection at the moment. May have to wait until 
tomorrow
morning before I can push it, being 20Meg or so)

Original comment by robert.g...@gmail.com on 22 Dec 2009 at 11:17

GoogleCodeExporter commented 9 years ago
I've pushed to Github and provided some basic Mac/Linux setup instructions. 
I've left
the Windows instructions unchanged, so someone with Windows should test and 
update.

Thanks again opeckojo!

Original comment by robert.g...@gmail.com on 23 Dec 2009 at 9:23

GoogleCodeExporter commented 9 years ago
Thanks for setting up a project on GitHub. If I encounter any other issues as I 
progress through the book I'll be 
sure and fork it and submit any patches if necessary.

Regards, Joe

Original comment by opeck...@gmail.com on 23 Dec 2009 at 2:41

GoogleCodeExporter commented 9 years ago
I haven't seen the reported issue until today.

Thanks for the contribution!

I would appreciate it if you put a reference to the book's site 
(http://www.manning.com/marmanis/) on the Github project page.

Best regards,
Babis

Original comment by babis.ma...@gmail.com on 30 Dec 2009 at 5:52