Rebar compile: where are the ebin files?

71 views
Skip to first unread message

Emacs the Viking

unread,
Jan 13, 2015, 8:38:11 AM1/13/15
to chica...@googlegroups.com
According to rebar docs, typing "rebar compile" is supposed to generate the files in ./ebin

I think this is why I have  "missing route" problem.... no ebin means no controllers loaded means no working deploy?

So,  where are the ./ebin files for *my* code... all the ./deps folders have BEAM files in their ebin but not my project source files. I know they are dynamically compiled in dev mode, but not in deploy mode.

I think this might be the root cause of the other problem.


Graeme Defty

unread,
Jan 13, 2015, 8:52:12 AM1/13/15
to chica...@googlegroups.com
What do you have in your boss.config file?



--
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/5a2e28be-1823-45d5-a0dd-8c2e42a2d97e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emacs the Viking

unread,
Jan 13, 2015, 11:58:16 AM1/13/15
to chica...@googlegroups.com
This is my boss.config, I just removed all the comments and inactive stuff...

% -*- mode: erlang -*-
[
 {cb_admin,
  [
   {path, "./deps/cb_admin"},
   {allow_ip_blocks,
    [
     "127.0.0.1"
    ]
   },
   {base_url, "/admin"}
  ]
 },

 {bcrypt, []},

 {boss,
  [
   {path, "./deps/boss"},
   {applications, [smsengine, cb_admin]},
   {assume_locale, "en"},

   {controller_filter_config, [{api_authorisation, [{method, auth_faked}]}]},

   {controller_filter_modules,
    [
     api_authorisation
    ]
   },

   {compiler_options, [debug_info, return_errors]},


   {db_host, "localhost"},
   {db_port, 1978},
   {db_adapter, mock},
   {port, 31415},
   {server, cowboy},

   {session_adapter, mock},
   {session_key, "_boss_session"},
   {session_exp_time, 525600},
   {session_cookie_http_only, false},
   {session_cookie_secure, false},

   {template_tag_modules, []},
   {template_filter_modules, []},
   {template_auto_escape, true},


   {dummy, true} % a final dummy option so we don't have to keep track of commas
  ]},


 { tinymq,
   [
   ]},


 {lager,
  [
   {handlers,
    [
     {lager_console_backend, info},
     {lager_file_backend,
      [
       {"log/error.log", error, 10485760, "$D0", 5},
       {"log/console.log", info, 10485760, "$D0", 5}
      ]}
    ]},
   {colored, true},
   {dummy, true}
  ]},

 %% APPLICATION CONFIGURATIONS
 { smsengine,
   [
    {path, "../smsengine"},
    {base_url, "/"},
    {dummy, true},
    {controller_modules,
     [
      smsengine_inbound_controller,
      smsengine_web_controller
     ]}
   ]}
].

kotedo

unread,
Jan 13, 2015, 2:26:35 PM1/13/15
to chica...@googlegroups.com, Emacs the Viking
A missing bin directory is usually not the end of the world.

* Let rebar create it if it doesn’t exist already
* Create one yourself

It’s a normal directory with normal (= project owner) permissions.  Nothing fancy.

The **only** thing that comes to mind that if you have an old project and and newer Erlang install
rebar might need to be updated. YMMV.

—Kai

Emacs the Viking

unread,
Jan 13, 2015, 4:05:53 PM1/13/15
to chica...@googlegroups.com, obj...@gmail.com
More digging...on the grounds that I have been known to mess things up in the past, I created a new project with the same name in a different location, and this *is* interesting... when I do a rebar compile the last few lines of the output from rebar are:

==> boss (pre_compile)
==> boss (compile)
==> smsengine (pre_compile)
bash-3.2$

Whereas in my broken project of the same name, doing a rebar compile...
==> simple_bridge (pre_compile)
==> simple_bridge (compile)
==> boss (pre_compile)
==> boss (compile)
==> cb_admin (pre_compile)
bash-3.2$

Ignoring cb_admin (it's not in the rebar.deps for the blank new project), it seems that there is *something* stopping rebar from seeing the project as a dependency!   I have opened both the boss.config and rebar.config files side by side looking for key differences but I can see none at all.

I am going to transfer the files into the new project and if it issues go away then I guess it has all been down to something really really really really...no, I mean really stupid I must have done in days gone by.

Thanks everybody for your input to this point, always appreciated.

Here are the rebar config files, the first one is the broken project, the second is the new blank one that seems to compile my code into ebin, perhaps somebody will spot something.

{deps,[
  {boss,     ".*",    {git, "git://github.com/ChicagoBoss/ChicagoBoss.git", {tag, "v0.8.13"}}},
  {cb_admin, ".*",    {git, "git://github.com/ChicagoBoss/cb_admin.git", "HEAD"}},
  {bcrypt,   "0.5.0", {git, "git://github.com/opscode/erlang-bcrypt.git", "HEAD"}}
 ]}.
{plugin_dir, ["priv/rebar"]}.
{plugins, [boss_plugin]}.
{eunit_compile_opts, [{src_dirs, ["src/test"]}]}.
{lib_dirs, ["../ChicagoBoss/deps/elixir/lib"]}.

and the good one:
{deps, [
  {boss, ".*", {git, "git://github.com/ChicagoBoss/ChicagoBoss.git", {tag, "v0.8.12"}}}
]}.
{plugin_dir, ["priv/rebar"]}.
{plugins, [boss_plugin]}.
{eunit_compile_opts, [{src_dirs, ["src/test"]}]}.
{lib_dirs, ["../ChicagoBoss/deps/elixir/lib"]}.

I am dying to know what I must have done wrong! I wasn't going to put the boss.configs here as they are large and sprawling but I thought I may as well, but in order to make it easier to see, I have loaded them and then dumped just the parsed structures: via file:consult/1 ... the bad one first... (I am going to keep looking!)

1> file:consult('boss.config').
{ok,[[{cb_admin,[{path,"./deps/cb_admin"},
                 {allow_ip_blocks,["127.0.0.1"]},
                 {base_url,"/admin"}]},
      {bcrypt,[]},
      {boss,[{path,"./deps/boss"},
             {applications,[smsengine]},
             {assume_locale,"en"},
             {controller_filter_config,[{api_authorisation,[{method,auth_faked}]}]},
             {controller_filter_modules,[api_authorisation]},
             {compiler_options,[debug_info,return_errors]},
             {db_host,"localhost"},
             {db_port,1978},
             {db_adapter,mock},
             {port,31415},
             {server,cowboy},
             {session_adapter,mock},
             {session_key,"_boss_session"},
             {session_exp_time,525600},
             {session_cookie_http_only,false},
             {session_cookie_secure,false},
             {template_tag_modules,[]},
             {template_filter_modules,[]},
             {template_auto_escape,true},
             {dummy,...}]},
      {tinymq,[]},
      {lager,[{handlers,[{lager_console_backend,info},
                         {lager_file_backend,[{"log/error.log",error,10485760,"$D0",
                                               5},
                                              {"log/console.log",info,10485760,"$D0",5}]}]},
              {colored,true},
              {dummy,true}]},
      {smsengine,[{path,"../smsengine"},
                  {base_url,"/"},
                  {dummy,true},
                  {controller_modules,[smsengine_inbound_controller,
                                       smsengine_web_controller]}]}]]}
the good one:
1> file:consult('boss.config').
{ok,[[{boss,[{path,"./deps/boss"},
             {applications,[smsengine]},
             {assume_locale,"en"},
             {db_host,"localhost"},
             {db_port,1978},
             {db_adapter,mock},
             {port,8001},
             {server,cowboy},
             {session_adapter,mock},
             {session_key,"_boss_session"},
             {session_exp_time,525600},
             {session_cookie_http_only,false},
             {session_cookie_secure,false},
             {template_tag_modules,[]},
             {template_filter_modules,[]},
             {dummy,true}]},
      {tinymq,[]},
      {lager,[{handlers,[{lager_console_backend,info},
                         {lager_file_backend,[{"log/error.log",error,10485760,"$D0",
                                               5},
                                              {"log/console.log",info,10485760,"$D0",5}]}]}]},
      {smsengine,[{path,"../smsengine"},
                  {base_url,"/"},
                  {dummy,true}]}]]}

Reply all
Reply to author
Forward
0 new messages