Errata on Github amber wiki "Writing My First App" page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Errata on Github amber wiki "Writing My First App" page

Darius Clarke
Hi Amber Team, 

I've finally had a chance to run through the "Writing My First App" instructions and found what I think is an issue.  Let me know how I can help fix this or if I'm mistaken. 

If one starts up the server with the given instructions:
Now start up amber with --base-path set to projects directory 

Then the index.html example's script source path is incorrect:

<script src="../vendor/amber/support/amber.js"></script>
    <script src="../vendor/amber/support/requirejs/require.min.js"></script>
should be

<script src="vendor/amber/support/amber.js"></script>
    <script src="vendor/amber/support/requirejs/require.min.js"></script>
Cheers,
Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Errata on Github amber wiki "Writing My First App" page

Hannes Hirzel
Hello Darius

Thank you for testing the instructions. I think you have found
something which needs clarification. But the fix is rather in the way
how to start up the server than to fix the path in the <script> tag.


    https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app

gives the directory layout


    projects/vendor/amber/
    projects/hello
    projects/hello/st
    projects/hello/js

In the setup I use the 'projects' folder is called 'amber-examples'.
Actually a clone of my for of
https://github.com/amber-smalltalk/amber-examples. I recommend you to
to this as well.


For a file index.html in the hello directory the <script> tag given is correct.

       <script src="../vendor/amber/support/amber.js"></script>
       <script src="../vendor/amber/support/requirejs/require.min.js"></script>

You need to start the server from the 'amber-examples' (or project) directory.

Amber-examples contains a small batch file

https://github.com/amber-smalltalk/amber-examples/blob/master/start.bat

If you use that you get a warning that an st and js directory is
missing but if you point then your web browser to

    http://localhost:4000/hello/

everything is fine.

The question now is how to we fix the wiki page

        https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app

to clarify this.

Regards

Hannes

On 9/21/13, Darius Clarke <[hidden email]> wrote:

> Hi Amber Team,
>
> I've finally had a chance to run through the "Writing My First App"
> instructions and found what I think is an issue.  Let me know how I can
> help fix this or if I'm mistaken.
>
> If one starts up the server with the given instructions:
> Now start up amber with --base-path set to projects directory
>
> Then the index.html example's script source path is incorrect:
>
> <script src="../vendor/amber/support/amber.js"></script>
>     <script
> src="../vendor/amber/support/requirejs/require.min.js"></script>
>
> should be
>
> <script src="vendor/amber/support/amber.js"></script>
>     <script src="vendor/amber/support/requirejs/require.min.js"></script>
>
> Cheers,
> Darius
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Errata on Github amber wiki "Writing My First App" page

Hannes Hirzel
P.S. Two weeks ago when I asked Herby questions about the directory
layout for Amber development which then led to an update of

     https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app

I thought that there is a need to have the 'hello app' available in
'amber-examples'.

The question of Darius supports this.

So here is the pull request

       https://github.com/amber-smalltalk/amber-examples/pull/29


And there is a need for more comparatively simple examples. Or
templates where people can start from, e.g. how to use a library like
https://github.com/boblemarin/Sprite3D.js

Hannes

On 9/22/13, H. Hirzel <[hidden email]> wrote:

> Hello Darius
>
> Thank you for testing the instructions. I think you have found
> something which needs clarification. But the fix is rather in the way
> how to start up the server than to fix the path in the <script> tag.
>
>
>     https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app
>
> gives the directory layout
>
>
>     projects/vendor/amber/
>     projects/hello
>     projects/hello/st
>     projects/hello/js
>
> In the setup I use the 'projects' folder is called 'amber-examples'.
> Actually a clone of my for of
> https://github.com/amber-smalltalk/amber-examples. I recommend you to
> to this as well.
>
>
> For a file index.html in the hello directory the <script> tag given is
> correct.
>
>        <script src="../vendor/amber/support/amber.js"></script>
>        <script
> src="../vendor/amber/support/requirejs/require.min.js"></script>
>
> You need to start the server from the 'amber-examples' (or project)
> directory.
>
> Amber-examples contains a small batch file
>
> https://github.com/amber-smalltalk/amber-examples/blob/master/start.bat
>
> If you use that you get a warning that an st and js directory is
> missing but if you point then your web browser to
>
>     http://localhost:4000/hello/
>
> everything is fine.
>
> The question now is how to we fix the wiki page
>
>         https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app
>
> to clarify this.
>
> Regards
>
> Hannes
>
> On 9/21/13, Darius Clarke <[hidden email]> wrote:
>> Hi Amber Team,
>>
>> I've finally had a chance to run through the "Writing My First App"
>> instructions and found what I think is an issue.  Let me know how I can
>> help fix this or if I'm mistaken.
>>
>> If one starts up the server with the given instructions:
>> Now start up amber with --base-path set to projects directory
>>
>> Then the index.html example's script source path is incorrect:
>>
>> <script src="../vendor/amber/support/amber.js"></script>
>>     <script
>> src="../vendor/amber/support/requirejs/require.min.js"></script>
>>
>> should be
>>
>> <script src="vendor/amber/support/amber.js"></script>
>>     <script src="vendor/amber/support/requirejs/require.min.js"></script>
>>
>> Cheers,
>> Darius
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Errata on Github amber wiki "Writing My First App" page

Darius Clarke
Hi Hannes, 

Thanks for addressing my concern. I've adjusted my paths and code to run as you describe and as the wiki says, including adding the js and st directories (with group write access) . 

Now I don't seem to be able to Commit.

Starting the server with:
# vendor/amber/bin/amber serve --base-path ~/projects/ --port 4000 --host mysite.com

Warning: project directory does not contain index.html
Starting file server on http://mysite.com:4000

And browsing to http://mysite.com:4000/myproject/

On Committing, I get the error message: Commiting http://mysite.com:4000/myproject/vendor/amber/js/Examples.js failed with reason: "File could not be created. Did you forget to create the st/js 
__

But it does commit if I launch the server with pointing to the Amber subproject alone: 

# vendor/amber/bin/amber serve --base-path ~/projects/myproject/vendor/amber/ --port 4000 --host mysite.com

Starting file server on http://mysite.com:4000

And browsing to http://mysite.com:4000/
__________

Also, there seems to be quite a time delay of more than 5 seconds after seeing the My First Amber Project [class browser] [say hello] page
during which clicking the [class browser] button causes an error message to the web browser Console screen:
 Uncaught Error: Module name "amber_vm/smalltalk" has not been loaded yet for context: _. Use require([])
http://requirejs.org/docs/errors.html#notloaded

and the Amber IDE doesn't load.

After the delay, pushing the [class browser] button launches the IDE.

Cheers, 
Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Errata on Github amber wiki "Writing My First App" page

Hannes Hirzel
Hello Darius

Currently I use Windows 7 for and work with a clone of
https://github.com/hhzl/amber-examples. The whole setup there works
fine as is.

I suggest that you try the setup on
https://github.com/amber-smalltalk/amber-examples first before doing a
variation of it. Work with your own fork.

In terms of Linux it seems that it is still an access right problem.
Unfortunately I cannot give more help at this time.

Regards
Hannes

On 9/23/13, Darius Clarke <[hidden email]> wrote:

> Hi Hannes,
>
> Thanks for addressing my concern. I've adjusted my paths and code to run as
> you describe and as the wiki says, including adding the js and st
> directories (with group write access) .
>
> Now I don't seem to be able to Commit.
>
> Starting the server with:
> # vendor/amber/bin/amber serve --base-path ~/projects/ --port 4000 --host
> mysite.com
>
> Warning: project directory does not contain index.html
> Starting file server on http://mysite.com:4000
>
> And browsing to http://mysite.com:4000/ <http://simignite.com:4000/>
> myproject/
>
> On Committing, I get the error message: Commiting
> http://mysite.com:4000/myproject/vendor/amber/js/Examples.js failed with
> reason: "File could not be created. Did you forget to create the st/js
> __
>
> But it *does* commit if I launch the server with pointing to the Amber
> subproject alone:
>
> # vendor/amber/bin/amber serve --base-path
> ~/projects/myproject/vendor/amber/
> --port 4000 --host mysite.com
>
> Starting file server on http://mysite.com:4000
>
> And browsing to http://mysite.com:4000/
> __________
>
> Also, there seems to be quite a time delay of more than 5 seconds after
> seeing the My First Amber Project [class browser] [say hello] page
> during which clicking the [class browser] button causes an error message to
> the web browser Console screen:
>  Uncaught Error: Module name "amber_vm/smalltalk" has not been loaded yet
> for context: _. Use require([])
> http://requirejs.org/docs/errors.html#notloaded
>
> and the Amber IDE doesn't load.
>
> After the delay, pushing the [class browser] button launches the IDE.
>
> Cheers,
> Darius
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Errata on Github amber wiki "Writing My First App" page

Darius Clarke
Thank you Hannes.
That's a good suggestion. I'll start from there. 

Regards, 
 Darius


On Wed, Sep 25, 2013 at 4:07 AM, H. Hirzel <[hidden email]> wrote:
Hello Darius

Currently I use Windows 7 for and work with a clone of
https://github.com/hhzl/amber-examples. The whole setup there works
fine as is.

I suggest that you try the setup on
https://github.com/amber-smalltalk/amber-examples first before doing a
variation of it. Work with your own fork.

In terms of Linux it seems that it is still an access right problem.
Unfortunately I cannot give more help at this time.

Regards
Hannes

On 9/23/13, Darius Clarke <[hidden email]> wrote:
> Hi Hannes,
>
> Thanks for addressing my concern. I've adjusted my paths and code to run as
> you describe and as the wiki says, including adding the js and st
> directories (with group write access) .
>
> Now I don't seem to be able to Commit.
>
> Starting the server with:
> # vendor/amber/bin/amber serve --base-path ~/projects/ --port 4000 --host
> mysite.com
>
> Warning: project directory does not contain index.html
> Starting file server on http://mysite.com:4000
>
> And browsing to http://mysite.com:4000/ <http://simignite.com:4000/>
> myproject/
>
> On Committing, I get the error message: Commiting
> http://mysite.com:4000/myproject/vendor/amber/js/Examples.js failed with
> reason: "File could not be created. Did you forget to create the st/js
> __
>
> But it *does* commit if I launch the server with pointing to the Amber
> subproject alone:
>
> # vendor/amber/bin/amber serve --base-path
> ~/projects/myproject/vendor/amber/
> --port 4000 --host mysite.com
>
> Starting file server on http://mysite.com:4000
>
> And browsing to http://mysite.com:4000/
> __________
>
> Also, there seems to be quite a time delay of more than 5 seconds after
> seeing the My First Amber Project [class browser] [say hello] page
> during which clicking the [class browser] button causes an error message to
> the web browser Console screen:
>  Uncaught Error: Module name "amber_vm/smalltalk" has not been loaded yet
> for context: _. Use require([])
> http://requirejs.org/docs/errors.html#notloaded
>
> and the Amber IDE doesn't load.
>
> After the delay, pushing the [class browser] button launches the IDE.
>
> Cheers,
> Darius
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.