Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How can I debug this?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ian  
View profile  
 More options Jul 20 2012, 10:05 am
From: Ian <hobso...@gmail.com>
Date: Fri, 20 Jul 2012 15:05:20 +0100
Local: Fri, Jul 20 2012 10:05 am
Subject: [erlang-questions] How can I debug this?
Hi All,

I am attempting to work through the Chicago Boss quickstart tutorial at
https://github.com/evanmiller/ChicagoBoss/wiki/Quickstart

I am using Windows 7 - 64 bit, and the R15B release of Erlang.  New to
Erlang.

First a minor bug - I think I installed the 32 bit version, removed it,
and installed the 64 bit version.  Then I discovered that the 64 bit  
version's bin directory is C:\Program Files\erl5.9.1\bin but the
directory in the path was C:\Program Files (x86)\erl5.9.1\bin. That was
why nothing worked.

After that was corrected, I created the project and set up the file in
Step 4, before starting the server with start-server.bat. The werl
window flashed up an error message for a second or so - and vanished
before I could read it!

A few tries later I was able to catch it in a screen dump. The error
message was:

{"init terminating in
do_boot",{undef,[{boss,start,[],[],{init,start_it,1,[{file
,"init.erl"},[line,1041}]},{init,start_em,1,[{file,"init.erl"},{line,1022}] }]}}

(copied by hand)

I know this means the server did not start up. But why, and what have I
done wrong/missed out? I have not found a init.erl file.

My project is called erlian and is in d:\erlian . The file
D:\erlian\src\controller\erlian_greeting_controller.erl
contains:

-module(erlian_greeting_controller, [Req]).
-compile(export_all).

hello('GET', []) ->
     {output, "<strong>Erlian says hello!</strong>"}.

(copy/pasted)

Help much appreciated.

Ian

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian  
View profile  
 More options Jul 20 2012, 11:18 am
From: Ian <hobso...@gmail.com>
Date: Fri, 20 Jul 2012 16:18:06 +0100
Local: Fri, Jul 20 2012 11:18 am
Subject: Re: [erlang-questions] How can I debug this?
Further information:

It is something to do with Windows and/or my windows setup.

I tried the same tutorial in Ubuntu, in a VM and it worked as advertised.

Regards

Ian
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cottlehuber  
View profile  
 More options Jul 21 2012, 3:36 pm
From: Dave Cottlehuber <d...@muse.net.nz>
Date: Sat, 21 Jul 2012 21:36:06 +0200
Local: Sat, Jul 21 2012 3:36 pm
Subject: Re: [erlang-questions] How can I debug this?
On 20 July 2012 17:18, Ian <hobso...@gmail.com> wrote:

> Further information:

> It is something to do with Windows and/or my windows setup.

> I tried the same tutorial in Ubuntu, in a VM and it worked as advertised.

> Regards

> Ian
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions

Hi Ian,

I've tested & get the same issue here as well. On my
side, the issue is that for some reason, boss isn't being
compiled correctly. I was able to build it manually but
can't see immediately why this doesn't work within the
rebar structure.

You can edit start-server.bat and replace werl for erl, this at
least means you can see the error messages in the command
prompt.

Let's move this to the Chicago Boss list, can you re-post there
with the output from your original windows-make script perhaps?

A+
Dave
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tom kelly  
View profile  
 More options Jul 22 2012, 11:16 am
From: tom kelly <ttom.ke...@gmail.com>
Date: Sun, 22 Jul 2012 17:16:06 +0200
Local: Sun, Jul 22 2012 11:16 am
Subject: Re: [erlang-questions] How can I debug this?

Hi Ian,

I'm CC'ing the list again. It was probably a typo not including them on
your mail? and I think it's important that more people see you points. If
we want Erlang usage to grow it's important that we address issues like
this as much as possible.

I'm happy to hear my input helped, and I find your comments as a newbie
interesting. I didn't see that thread your referenced last week (going to
search for it as soon as I hit send) but I'm sure we can all associate with
the frustrations of struggling with unfamiliar tools or environments. I can
only speak for myself but will try to smooth things for newbies, even if
it's only by replying to similar questions here more often.

//TTom

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Armstrong  
View profile   Translate to Translated (View Original)
 More options Jul 25 2012, 4:25 am
From: Joe Armstrong <erl...@gmail.com>
Date: Wed, 25 Jul 2012 10:25:18 +0200
Local: Wed, Jul 25 2012 4:25 am
Subject: Re: [erlang-questions] How can I debug this?

> {"init terminating in
> do_boot",{undef,[{boss,start,[],[],{init,start_it,1,[{file
> ,"init.erl"},[line,1041}]},{init,start_em,1,[{file,"init.erl"},{line,1022}] }]}}

This error message means Erlang cannot find the file boss.beam - some
code has tried to
evaluate the function boss:start() (That's what the cryptic error
message means) and the module
boss is not loaded. When this happens the system tries to find a file
called boss.beam - this must
be one of the files in the code load path.

To debug this - start erlang (If you can't start erlang at all) you're screwed.
then in the erlang shell give the command and code:get_path()
(Or io:format("~p~n",[code:get_path()]).

When I do this I see this:

1 > io:format("~p~n",[code:get_path()]).
[".","/usr/local/lib/erlang/lib/kernel-2.15/ebin",
 "/usr/local/lib/erlang/lib/stdlib-1.18/ebin",
...
"/home/joe/projects/doc42/ebin","/home/joe/projects/validate",
 "/home/joe/nobackup/erlang_imports/deps/meck/ebin",
 "/home/joe/nobackup/erlang_imports/deps/cowboy/ebin",
 "/home/joe/nobackup/erlang_imports/deps/bitcask/ebin"]

One of these directories should contain the file boss.beam

Since boss.beam is not in your path you have to find and add it to your path.
This can be done in (at least) three ways:

If boss.beam is in the directory DIR then you can evaluate this:

> code:add_pathz(Dir).

in the shell

Better is to add it to the erlang startup file.

On a unix or mac you just make a file called ".erlang" which is either
on ${HOME}/.erlang
or the  directory you start erlang from.

I tried to do this on windows but I have no evironment variable HOME
and I do now have write permissions
under Program Files (or whatever)

(( Actually I'd like to keep an up-to-date install guide on the erlang
web site so if anybody
could tell me how to make a .erlang file on windows I would be appreciate this))

Once we know how to make a .erlang file I can fill in the details of
how to get your
boss example running.

Just keep mailing back to this thread every time you have a problem
and we'll get it fixed.

Cheers

/Joe

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian  
View profile   Translate to Translated (View Original)
 More options Jul 25 2012, 5:49 am
From: Ian <hobso...@gmail.com>
Date: Wed, 25 Jul 2012 10:49:29 +0100
Local: Wed, Jul 25 2012 5:49 am
Subject: Re: [erlang-questions] How can I debug this?
Hi Joe,

Thanks for the reply!

On 25/07/2012 09:25, Joe Armstrong wrote:

> On a unix or mac you just make a file called ".erlang" which is either
> on ${HOME}/.erlang or the directory you start erlang from. I tried to
> do this on windows but I have no evironment variable HOME and I do now
> have write permissions under Program Files (or whatever) (( Actually
> I'd like to keep an up-to-date install guide on the erlang web site so
> if anybody could tell me how to make a .erlang file on windows I would
> be appreciate this

The equivalent of HOME is %USERPROFILE%.

The more tricky problem with the windows install was that the install
script does not change the path variable. I guess because there might be
more than one version of erlang installed.  The more satisfactory
solution is to add the <install location>/bin to the path.
Setting up a erl.bat and .werl.bat files is not enough because escript
remains broken, and that leads to further problems.

> )) Once we know how to make a .erlang file I can fill in the details
> of how to get your boss example running. Just keep mailing back to
> this thread every time you have a problem and we'll get it fixed.
> Cheers /Joe

Thanks for the offer. I'll try not to waste people's time.

Ian

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cottlehuber  
View profile   Translate to Translated (View Original)
 More options Jul 25 2012, 8:14 am
From: Dave Cottlehuber <d...@muse.net.nz>
Date: Wed, 25 Jul 2012 14:14:34 +0200
Local: Wed, Jul 25 2012 8:14 am
Subject: Re: [erlang-questions] How can I debug this?
On 25 July 2012 10:25, Joe Armstrong <erl...@gmail.com> wrote:

> Better is to add it to the erlang startup file.

> On a unix or mac you just make a file called ".erlang" which is either
> on ${HOME}/.erlang
> or the  directory you start erlang from.

> I tried to do this on windows but I have no evironment variable HOME
> and I do now have write permissions
> under Program Files (or whatever)

> (( Actually I'd like to keep an up-to-date install guide on the erlang
> web site so if anybody
> could tell me how to make a .erlang file on windows I would be appreciate this))

On Windows, the HOME env var trick doesn't work, you need to use the
current working directory of the werl/erl process instead.
@Joe what format (or where in OTP source) is best for documenting
this? I've got a few other things that would be useful too.

## Creating a working .erlang file:

- open notepad or <decent_editor_of_your_choice>,  and paste this in,
or whatever you prefer:

   c:pwd(), io:format("running .erlang~n", []).

- file -> save as ".erlang" including the double quotes. This tells
the dialog box NOT to add .txt, just to use the provided filename.

## Create a shortcut to use this new startup file:

- right-click on desktop
- create new shortcut
- enter path c:\erlang\bin\werl.exe (or where-ever you installed the
appropriate version)
- name it whatever & click finish
- right-click on new icon & select "properties"
- change "Start In" field to the directory you want to load your
.erlang file from
- click OK

## Alternatively, from command line

    start  /d c:\home c:\erlang\bin\werl.exe

Or:

- change directory to the same folder as your .erlang file
- run c:\erlang\bin\werl.exe (or erl.exe)

BTW Ian's original issue is that Chicago Boss uses proper as a rebar
dependency, and proper uses some shell scripts which don't work under
native windows. This prevents Boss from compiling successfully
depending on what unix-like shell you are using, if any.

A+
Dave
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Armstrong  
View profile  
 More options Jul 25 2012, 10:17 am
From: Joe Armstrong <erl...@gmail.com>
Date: Wed, 25 Jul 2012 16:17:04 +0200
Local: Wed, Jul 25 2012 10:17 am
Subject: Re: [erlang-questions] How can I debug this?

Plain text is fine - I'll reformat if necessary - it's the content
that's the important bit

> ## Creating a working .erlang file:

> - open notepad or <decent_editor_of_your_choice>,  and paste this in,
> or whatever you prefer:

>    c:pwd(), io:format("running .erlang~n", []).

Or

   io:format("running .erlang in ~p~n", [file:get_cwd()]).

> - file -> save as ".erlang" including the double quotes. This tells
> the dialog box NOT to add .txt, just to use the provided filename.

> ## Create a shortcut to use this new startup file:

> - right-click on desktop
> - create new shortcut
> - enter path c:\erlang\bin\werl.exe (or where-ever you installed the
> appropriate version)
> - name it whatever & click finish
> - right-click on new icon & select "properties"
> - change "Start In" field to the directory you want to load your
> .erlang file from
> - click OK

It worked - thanks

> ## Alternatively, from command line

>     start  /d c:\home c:\erlang\bin\werl.exe

> Or:

> - change directory to the same folder as your .erlang file
> - run c:\erlang\bin\werl.exe (or erl.exe)

> BTW Ian's original issue is that Chicago Boss uses proper as a rebar
> dependency, and proper uses some shell scripts which don't work under
> native windows. This prevents Boss from compiling successfully
> depending on what unix-like shell you are using, if any.

Sigh - then we'll have to compile chicago boss manually
(or fix the scripts)

Manual compilation is something like ..

$ cd ~/Downloads/ChicagoBoss-0.7.5/src/boss
$ erlc .o ../../ebin -I ../../include *.erl

You'll have to do this for each directory that has .erl files in it

/Joe

 > cd

> A+
> Dave
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »