This should be amended to also allow for elixir files
string:right(String, 4) == ".erl" orelse string:right(String, 3) == ".ex"
I started (trying) to use Elixir in CB back when it was first implemented, but the lack of further development left me no choice and I abandoned it for ChicagoBoss.--I still love ChicagoBoss and Erlang even though there is Elixir and PhoenixFramework. The right tool for the problem as we say.Regards,—KaiOn Mar 22, 2015, at 08:09, Graeme Defty <graeme...@gmail.com> wrote:gIs anyone using Elixir for anything in CB?Any ideas anyone?I tried both of those options but neither led me down a path to success.which rewarded me with:and all went OK until...i.e. - Uncommented {elixir …} in rebar.config- followed the instructions at https://github.com/ChicagoBoss/ChicagoBoss/blob/master/README_ELIXIR.md- created new project to make sure everything was OK- compiled- got depsSo I decided to start again with a clean install of CB.The first things was just to get Elixir working for normal stuff - controllers, etc.I proceeded as follows:- duplicated the latest repository (0.8.14)
- Copied priv/elixir to src/
- ./rebar get-deps
- ./rebar compile
- PATH=./deps/elixir/bin:.:$PATH mix deps.get
Could not start Hex. Try fetching a new version with `mix local.hex` or uninstalling it with `mix local.uninstall hex`
On 22 March 2015 at 07:55, Tim McNamara <mcnama...@gmail.com> wrote:Great work!
On 22 Mar 2015 02:53, "Graeme Defty" <graeme...@gmail.com> wrote:My first step was to change boss_template_adapter_jade.erl to call 'Elixir.Jadelix':compile, rather than jaderl:compile.Now the tricky part . . . integrating it into the CB environment.As a means of learning Elixir I decided to 'port' the Jade compiler I wrote to the new beam VM language.This turned out to be exactly the case and the new compiler works beautifully. I have not yet extended it to add any new capabilities, but it works fine as a stand-alone Elixir application and working with Elixir is a joy, so I do intend to enhance this version and support it as a production-ready component of CB (which it never really was before - nor claimed to be).
I was never really thrilled with the Jaderl compiler I created, partly I think because it generated Erlang source which then had to be compiled. I always intended to cut out that intermediate form, but it looked to me that Elixir had much cleaner internals and it would therefore be easier to generate beam bytecode directly.However, on performing 'make' there is some problem (though no message) compiling Jadelix itself, because no .beam file is produced and as a result, compiling a jade template gives:<pre>ERROR: pre_compile failed while processing /home/graeme/projects/egolf/dev/jadelix: {'EXIT',
{undef,
[{'Elixir.Jadelix',compile,
["src/view/hello/about.jade",jadelix_view_hello_about_jade,
[{out_dir,"ebin"}]],
[]},
{boss_template_adapter_jade,compile_file,3,
[{file,
"src/boss/template_adapters/boss_template_adapter_jade.erl"},
{line,19}]},
{boss_load,'-load_views_inner/3-fun-1-',5,
[{file,"src/boss/boss_load.erl"},{line,404}]},
{boss_load,load_views,3,[{file,"src/boss/boss_load.erl"},{line,395}]},
{boss_load,'-make_all_modules/3-fun-1-',3,
[{file,"src/boss/boss_load.erl"},{line,84}]},
{lists,map,2,[{file,"lists.erl"},{line,1237}]},
{lists,map,2,[{file,"lists.erl"},{line,1237}]},
{boss_load,load_all_modules,3,
[{file,"src/boss/boss_load.erl"},{line,62}]}]}}</pre><pre>
I compiled Jadelix elsewhere and copied in the .beam file by hand, but when it is used to compile a jade template it raises an error trying to access the Elixir IO module.ERROR: pre_compile failed while processing /home/graeme/projects/egolf/dev/jadelix:
{'EXIT',
{undef,
[{'Elixir.IO',puts,[<<"Opening file ${filename}">>],[]},
{'Elixir.Jadelix',add_file,3,[{file,"lib/jadelix.ex"},{line,187}]},
{'Elixir.Jadelix',compile,3,[{file,"lib/jadelix.ex"},{line,88}]},
{boss_template_adapter_jade,compile_file,3,
[{file,
"src/boss/template_adapters/boss_template_adapter_jade.erl"},
{line,19}]},
{boss_load,'-load_views_inner/3-fun-1-',5,
[{file,"src/boss/boss_load.erl"},{line,404}]},
{boss_load,load_views,3,[{file,"src/boss/boss_load.erl"},{line,395}]},
{boss_load,'-make_all_modules/3-fun-1-',3,
[{file,"src/boss/boss_load.erl"},{line,84}]},
{lists,map,2,[{file,"lists.erl"},{line,1237}]}]}}
make: *** [compile] Error 1</pre>
I assume that the Elixir modules are not loaded. I have followed the steps for allowing Elixir use in my application and not sure what to try next.Any thoughts?g--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAKF5fiAXrGU8DRi5PCp0tdnU_KNmn2e%2BcEkJU_E1tDLOrTMr_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAMUs9-MutiL-GLEupvg4bBidecs2V4a0Rgxw%2BaggRiASi3TT6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAKF5fiC4KxrFyUQ_qsd5z6c1mze_pyZS4-BExrAUwvrttBmvvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/BA400B47-F394-4CF1-AD5C-0B6B33E19E43%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at https://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/f06ff9be-e212-4857-ac53-455a7729c5cf%40googlegroups.com.
just try to follow example in readme and see if everything works for you
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at https://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/d86b2982-8d52-49c9-8c5b-fb56bae1956a%40googlegroups.com.