| Author |
Message |
|
| ketralnis |
Posted: Wed Sep 05, 2007 12:11 am |
|
|
|
User
Joined: 20 Jul 2007
Posts: 151
Location: San Francisco, CA
|
If I have an Erlyweb application compiled and running, then re-start
Yaws and try to run my application, all of my functions and modules
appear "undefined". In order to be able to call my already-compiled
code, I have to compile it again.
Before compiling, code:get_path() seems to show that the Erlyweb
ebin/ directory doesn't exist in the code-path. If I add it myself
with code:add_path(AppDir), my code seems to run just fine. But
compiling doesn't add it to the code-path either, so I assume that
Erlyweb is manually loading these modules after compiling them.
So is there any way that we can get Erlyweb to add this to the code-
path when Yaws brings it up? Or does yaws not call into Erlyweb until
a request is issued? (which of course won't work if Erlyweb's modules
can't be found Or would this cause other unseen problems?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Sep 05, 2007 12:28 am |
|
|
|
Guest
|
ErlyWeb does manually load your modules after compiling them. As you
said, if you manually add your app's ebin directory to Yaws's code
path, you don't have to recompile the app when you restart Yaws. I
don't think that ErlyWeb should call code:add_path() because the
ErlyWeb appmod is called on every browser request, and code:add_path()
only needs to be called once on startup (currently, there isn't a
formal way of "starting" ErlyWeb, but maybe there should be...)
On 9/4/07, David King <dking@ketralnis.com> wrote:
>
> If I have an Erlyweb application compiled and running, then re-start
> Yaws and try to run my application, all of my functions and modules
> appear "undefined". In order to be able to call my already-compiled
> code, I have to compile it again.
>
> Before compiling, code:get_path() seems to show that the Erlyweb
> ebin/ directory doesn't exist in the code-path. If I add it myself
> with code:add_path(AppDir), my code seems to run just fine. But
> compiling doesn't add it to the code-path either, so I assume that
> Erlyweb is manually loading these modules after compiling them.
>
> So is there any way that we can get Erlyweb to add this to the code-
> path when Yaws brings it up? Or does yaws not call into Erlyweb until
> a request is issued? (which of course won't work if Erlyweb's modules
> can't be found Or would this cause other unseen problems?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| ketralnis |
Posted: Wed Sep 05, 2007 1:18 am |
|
|
|
User
Joined: 20 Jul 2007
Posts: 151
Location: San Francisco, CA
|
> ErlyWeb does manually load your modules after compiling them. As you
> said, if you manually add your app's ebin directory to Yaws's code
> path, you don't have to recompile the app when you restart Yaws. I
> don't think that ErlyWeb should call code:add_path() because the
> ErlyWeb appmod is called on every browser request, and code:add_path()
> only needs to be called once on startup (currently, there isn't a
> formal way of "starting" ErlyWeb, but maybe there should be...)
For my dev environment it's not a problem, but when I get ready to go
to production, that's something that I'll definitely want
It does seem kind of silly to be compiling the app on a production
server that may not have a compiler installed. (CEAN, for instance,
can be installed without a compiler.) Installing a compiler isn't
that big a deal, it just seems silly to have to do so on a production
machine.
I guess i could just launch Yaws with -pa ./ebin
> On 9/4/07, David King <dking@ketralnis.com> wrote:
>>
>> If I have an Erlyweb application compiled and running, then re-start
>> Yaws and try to run my application, all of my functions and modules
>> appear "undefined". In order to be able to call my already-compiled
>> code, I have to compile it again.
>>
>> Before compiling, code:get_path() seems to show that the Erlyweb
>> ebin/ directory doesn't exist in the code-path. If I add it myself
>> with code:add_path(AppDir), my code seems to run just fine. But
>> compiling doesn't add it to the code-path either, so I assume that
>> Erlyweb is manually loading these modules after compiling them.
>>
>> So is there any way that we can get Erlyweb to add this to the code-
>> path when Yaws brings it up? Or does yaws not call into Erlyweb until
>> a request is issued? (which of course won't work if Erlyweb's modules
>> can't be found Or would this cause other unseen problems?
>>
>>>
>>
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Sep 05, 2007 1:24 am |
|
|
|
Guest
|
>
> I guess i could just launch Yaws with -pa ./ebin
>
That was the idea
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
| dmitriid |
Posted: Wed Sep 05, 2007 6:57 am |
|
|
|
User
Joined: 17 Aug 2006
Posts: 213
|
David King wrote: Quote: Quote: ErlyWeb does manually load your modules after compiling them. As you said, if you manually add your app's ebin directory to Yaws's code path, you don't have to recompile the app when you restart Yaws. I don't think that ErlyWeb should call code:add_path() because the ErlyWeb appmod is called on every browser request, and code:add_path() only needs to be called once on startup (currently, there isn't a formal way of "starting" ErlyWeb, but maybe there should be...) [/code] For my dev environment it's not a problem, but when I get ready to go to production, that's something that I'll definitely want  It does seem kind of silly to be compiling the app on a production server that may not have a compiler installed. (CEAN, for instance, can be installed without a compiler.) Installing a compiler isn't that big a deal, it just seems silly to have to do so on a production machine. I guess i could just launch Yaws with -pa ./ebin [/code] You can also use a start_mod: http://blogtrader.net/page/dcaoyuan?entry=from_rails_to_erlyweb_part4
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|