<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.erlang.chicagoboss">
    <title>gmane.comp.lang.erlang.chicagoboss</title>
    <link>http://blog.gmane.org/gmane.comp.lang.erlang.chicagoboss</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4069"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4068"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4064"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4063"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4057"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4054"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4049"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4041"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4033"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4031"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4030"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4021"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4020"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4019"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4015"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4012"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4006"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3996"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3994"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3991"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4069">
    <title>Using boss_migrate for initial data</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4069</link>
    <description>&lt;pre&gt;Hey all,

I've been reviewing the past discussions that led up to the development of 
boss_migrate, and it looks like it actually started with the desire to be 
able to initialize a database&amp;lt;https://groups.google.com/d/topic/chicagoboss/-k7bkFr7N3g/discussion&amp;gt;. 
 Along those lines, I was wondering if db migrations were a smart way to 
initialize *data* as well as schema.  It's certainly possible to do, but I 
know boss_migrate is far from complete, and I don't want to commit to it if 
I'll encounter problems down the roadmap...

In my particular use case, (probably quite common,) my application is going 
to launch with a number of predefined user roles, and surely there will be 
other production data.  I'd rather that data lived in code, so I can be 
free to fill my development database with test data, and I can dump and 
recreate my development database at any time with the initial data in place.

Any thoughts?

Also, boss_migrate only seems to be fully supported on pgsql at the moment, 
but I managed to get it working on mongo.  Migrations currently use 
transactions, which are not supported by mongo, and which I didn't even 
attempt to implement, but it's otherwise completely working.  Evan, let me 
know if you want me to submit a pull request for this...

Thanks,
-Lucas- 

&lt;/pre&gt;</description>
    <dc:creator>Lucas Introne</dc:creator>
    <dc:date>2013-05-18T01:02:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4068">
    <title>template oddity</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4068</link>
    <description>&lt;pre&gt;      {% with first_exam = student.completed_exams | first %}
      {% with first_completed_at = first_exam.completed_at %}

first_completed_at prints out as undefined!

Ideas?
--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

&lt;/pre&gt;</description>
    <dc:creator>David Welton</dc:creator>
    <dc:date>2013-05-17T15:12:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4064">
    <title>Concurix &amp; ChicagoBoss</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4064</link>
    <description>&lt;pre&gt;All,
  I recently watched a presentation by Concurix, where they talked about 
improving Erlang performance and their use of ChicagoBoss.  Here is a link:

      http://www.youtube.com/watch?v=GyHXLIHtPDM

Outside of the Erlang runtime, have any of these performance observations 
been addressed in ChicagoBoss itself?  It looks like a great tool to help 
profile ChicagoBoss/Erlang apps.

&lt;/pre&gt;</description>
    <dc:creator>Nick Pavlica</dc:creator>
    <dc:date>2013-05-16T16:10:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4063">
    <title>cb_admin: crash on 2nd(?) "Upgrade BEAM code"</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4063</link>
    <description>&lt;pre&gt;Hi,

I have a problem with the "Upgrade BEAM code" function of cb_admin. It 
regularly crashes the server when I do that.

I have not yet pinpointed what exactly causes that (I'm new to erlang and 
still trying to find my way), but apparently every second code reload 
crashes.

I've read in another thread that erlang shuts down processes using old code 
when upgrading? Maybe that's related... whatever has been shut down might 
not be there on the second reload.

Looking at the log I see Mnesia turning up and memcached. Anyone have 
similar experience or ideas where to dig for the root cause?

I'm running on CB 0.8.5 (I think) and Erlang R15B03

Thanks in advance,
Christian

Some log messages from restart of server over two reloads (close together) 
to crash:

2013-05-16 17:25:35.842 [info] &amp;lt;0.6.0&amp;gt; Application lager started on node 

&lt;/pre&gt;</description>
    <dc:creator>cr-gFeuEfs/3pV+utjNUv0ryw&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-05-16T15:34:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4057">
    <title>N2o - A new Erlang Web Framework</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4057</link>
    <description>&lt;pre&gt;Ran across this framework while searching for some information on Erlang 
and WebSockets, and thought I would share it here:

  -  https://github.com/5HT/n2o

Looks like they too Nitrogen and changed it to meet their needs.




&lt;/pre&gt;</description>
    <dc:creator>Nick Pavlica</dc:creator>
    <dc:date>2013-05-15T04:05:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4054">
    <title>Idiomatic way of handling CORS?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4054</link>
    <description>&lt;pre&gt;Hi all,

First off I am new to this group and the ChicagoBoss framework, but have 
absolutely loved the experience so far. Best regards to all those involved 
for the fantastic work put into ChicagoBoss. 

My question is regarding Cross-origin resource sharing (CORS). I couldn't 
seem to find any example implementations of a controller serving JSON cross 
domain with CORS and was wondering if there was an idiomatic way I should 
read up on to accomplish CORS in ChicagoBoss? 

The working solution I went with is below. (gist copy here 
https://gist.github.com/codystebbins/dd797a07fd7964c4d1cc). It catches the 
preflight OPTIONS request and responds with required CORS headers, and then 
actually saves the message on the second POST request for cross domain ajax 
POST requests.

create('OPTIONS', []) -&amp;gt;
  Headers = [{'Access-Control-Allow-Origin', "*"},
    {'Access-Control-Allow-Methods',  "POST, OPTIONS"},
    {'Access-Control-Allow-Headers', "X-Requested-With, Content-Type"},
    {'Access-Control-Max-Age', "180"}],
  {json, [], Headers};

create('POST', []) -&amp;gt;
  Headers = [{'Access-Control-Allow-Origin', "*"},
    {'Access-Control-Allow-Methods',  "POST, OPTIONS"},
    {'Access-Control-Allow-Headers', "X-Requested-With"},
    {'Access-Control-Max-Age', "180"}],
  Text = Req:post_param("text"),
  NewMessage = message:new(id, Text),
  case NewMessage:save() of
    {ok, SavedMessage} -&amp;gt;
      {json, [{error, false}, {id, SavedMessage:id()}], Headers};
    {error, ErrorList} -&amp;gt;
      {json, [{errors, ErrorList}, {new_msg, NewMessage}], Headers}
  end.

Kind regards,
Cody Stebbins

&lt;/pre&gt;</description>
    <dc:creator>Cody Stebbins</dc:creator>
    <dc:date>2013-05-14T23:19:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4049">
    <title>Video: Chicago Boss &lt; at &gt; Erlang Factory</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4049</link>
    <description>&lt;pre&gt;Hey gang,

As alluded to in a previous thread, the video of my talk at SF Bay Erlang
Factory 2013 is now up on YouTube:

Chicago Boss: A Web Framework Built for Comfort (and Speed) - Evan
Miller&amp;lt;https://www.youtube.com/watch?v=LGGo6bIuj8w&amp;gt;

I've tried to cover some of the "philosophical" aspects of why I started
the project, so maybe even battle-hardened CB veterans who know the API
inside and out will find some things to think about.

Enjoy!

Evan

&lt;/pre&gt;</description>
    <dc:creator>Evan Miller</dc:creator>
    <dc:date>2013-05-13T22:20:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4041">
    <title>Great First Impressions!</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4041</link>
    <description>&lt;pre&gt;

All,

  Just went through the, “Chicago Boss: A Rough Introduction”, tutorial and 
was very impressed!  Coming from my previous framework of choice, ROR  :), 
it felt very natural to work with the framework during the tutorial.  Like 
many other ROR “web developers”, I’m looking  for alternatives frameworks, 
and languages that are concurrent, performant, and productive.  The recent 
TechEmpower benchmarks (http://www.techempower.com/benchmarks/) , and my 
personal experience with ROR, are quite telling when it comes to 
performance, and scaling Internet software services built with Rails. 
 Chicago Boss, and it’s associated frameworks seem to address most of these 
concerns. Great Job!!  


However, I still have a few simple questions/concerns, that I wanted to 
address. 

- Chicago Boss is dependent on the master not failing for some of it’s 
services to remain available.  I believe that this is being addressed, and 
was wondering what the state these changes are currently in? 

I’m guessing that this is related to the other OTP compliance work that’s 
being done?

-  Parameterized Modules:  I have noticed that Chicago Boss utilizes 
parameterized modules throughout the framework, however it appears that the 
Erlang developers are moving away from them.  I realize that they are 
allowing for workarounds, but  it seem more like an unwanted side effect in 
the eyes of the Erlang board.  Is there a plan/need to address this in the 
long term?

- As a side note, I was unable to successfully build CB using the 
Ubuntu(13.04) R15B1 packages, but had great success with the Erlang Factory 
R16B package.  I have also noticed that others are having issues with R14 (
https://github.com/evanmiller/ChicagoBoss/issues/247).  Should the docs be 
updated to state that CB should use R15B3-1, or Newer?

Thanks!

--Nick

&lt;/pre&gt;</description>
    <dc:creator>Nick Pavlica</dc:creator>
    <dc:date>2013-05-13T17:48:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4033">
    <title>production rules for reload vs. restart</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4033</link>
    <description>&lt;pre&gt;I am confused when a CB app needs to be restarted.

I was messing around with some code hot-swapping, and changes in my views 
(copy) took immediate affect when I pulled in the new code

then `rebar compile` followed by `./init.sh reload` ...

however, I created some other pages, changed some things around in 
myapp.routes, did the above raindance, and the changes could only 

be realized via `init.sh restart` ...

If I used my imagination, I could figure out when hot-swapping works, and 
when a restart is needed, but just to be certain, what are the various 

conditions where the app needs to be `restarted' and not just `reloaded' 
for things to take effect?

&lt;/pre&gt;</description>
    <dc:creator>_nato_</dc:creator>
    <dc:date>2013-05-10T19:37:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4031">
    <title>Chicago Boss in Russia</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4031</link>
    <description>&lt;pre&gt;Hi, Chicago Boss!

Me and my friend (php-developers from xenaogames.com and ronasit.com) are
really wonder of your framework. We think it has a big future and
perspectives. But we didn't find a russian site or other resourse devoted
to your awsome framework.
We want to tell everybody in Russia about Chicago Boss and help russian
community to create great apps with it.
We want to make a Russian Chicago Boss fan-site, where we can post
translations of articles, answer the questions and so on. We need your
consent to build it.

Best regards, Nikita Verkhovin and Evgeny Leonov

&lt;/pre&gt;</description>
    <dc:creator>Никита Верховин</dc:creator>
    <dc:date>2013-05-12T15:56:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4030">
    <title>Query string params break functional tests</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4030</link>
    <description>&lt;pre&gt;Hey all,

I'm having trouble with my functional tests, because my URLs occasionally 
need to have query string params, and those choke the test framework. 
 Here's a simple example:

-module(foo_test).
-export([start/0]).

start()-&amp;gt;
boss_web_test:get_request("/foo?q=bar", [],
[
fun boss_assert:http_ok/1
], []).

This test fails with:
* "HTTP Status not 200 OK"
Last response: {404,"/foo?q=bar",
                [{"Content-Type","text/html"}],
                {&amp;lt;&amp;lt;"html"&amp;gt;&amp;gt;,[],
                 [&amp;lt;&amp;lt;"No routes matched the requested URL."&amp;gt;&amp;gt;]}}

It works fine if I request /foo without the query string. Also, on pages 
rendered with a template, it looks for a template name which includes the 
query string, e.g. foo?q=bar.{dtl,html,txt,jade,eex}.

Does anyone know how to fix this?

Thanks,
-Lucas-

&lt;/pre&gt;</description>
    <dc:creator>Lucas Introne</dc:creator>
    <dc:date>2013-05-11T06:12:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4021">
    <title>Error when trying to create records using boss_record:new/2</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4021</link>
    <description>&lt;pre&gt;Hey guys

I used boss_record:new/2 to create a new record with a few fields only 
(instead of all the fields). The record was saved, but it also returned an 
error.

*Here's the post model (post.erl):*

-module(post, [Id, Title, Description, UserId]).
-compile(export_all).


*Here's what I tried in the shell:*

(twm&amp;lt; at &amp;gt;HashNuke)2&amp;gt; Post = boss_record:new(post, [{title, "awesome"}]).

{post,id,"awesome",undefined,undefined}

 

(twm&amp;lt; at &amp;gt;HashNuke)3&amp;gt; Post:save().

10:51:27.018 [error] Error parsing Boss record id: error:function_clause

 

{ok,{post,"post-51888f5751b7cfad6c000001","awesome",

          undefined,undefined}}


When I list posts, I do find the new post saved in the db. I'm curious 
about the error "Error parsing Boss record id: error:function_clause".
I'm using Erlang R15B03 and Chicago Boss v0.8.6. The app uses MongoDB.

Also, is there any other way of creating records only with a few fields 
instead of all of the fields?

Thank you ~!

P.S: Sorry about the duplication. The previous post had typos in it. So I 
deleted it in favour of a new one.

&lt;/pre&gt;</description>
    <dc:creator>Akash Manohar J</dc:creator>
    <dc:date>2013-05-10T09:10:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4020">
    <title>Error when trying to save records using boss_db:new/2</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4020</link>
    <description>&lt;pre&gt;Hey guys

I used boss_db:new/2 to save a record with a few fields only (instead of 
all the fields). The record was saved, but it also returned an error.

*Here's the post model (post.erl):*

-module(post, [Id, Title, Description, UserId]).
-compile(export_all).


*Here's what I tried in the shell:*

(twm&amp;lt; at &amp;gt;HashNuke)2&amp;gt; Post = boss_record:new(post, [{title, "awesome"}]).

{post,id,"awesome",undefined,undefined}

 

(twm&amp;lt; at &amp;gt;HashNuke)3&amp;gt; Post:save().

10:51:27.018 [error] Error parsing Boss record id: error:function_clause

 

{ok,{post,"post-51888f5751b7cfad6c000001","awesome",

          undefined,undefined}}


When I list posts, I do find the new post saved in the db. I'm curious 
about the error "Error parsing Boss record id: error:function_clause".
I'm using Erlang R15B03 and Chicago Boss v0.8.6. The app uses MongoDB.

Also, is there any other way of creating records only with a few fields 
instead of all of the fields?

Thank you ~!

&lt;/pre&gt;</description>
    <dc:creator>Akash Manohar J</dc:creator>
    <dc:date>2013-05-09T14:55:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4019">
    <title>custom template tags - example of creating custom tag with parsin until {% endfoo %}</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4019</link>
    <description>&lt;pre&gt;Hello,
Are there any examples of custom complex erlydtl tags with syntax like 
{% foo [params] %}[html with access to foo context variables] {% endfoo %} ?

&lt;/pre&gt;</description>
    <dc:creator>Evgeny M</dc:creator>
    <dc:date>2013-05-09T10:22:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4015">
    <title>Having a hard time rendering a parameter</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4015</link>
    <description>&lt;pre&gt;Hi everyone,

I'm a very seasoned Python and Django developer, keenly interested in 
Erlang. I've also done my share of Rails development, so ChicagoBoss seems 
like a very natural place for me to start developing with Erlang.

I was able to get Boss running and write the sample "rahm" app. Then I 
thought, I'll just pass in what to say as a URL parameter segment:

% rahm_greeting_controller.erl

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

hello('GET', []) -&amp;gt;
    {ok, [{message, "Hello"}]}



% view/greeting/hello.html

&amp;lt;strong&amp;gt;Rahm says {{ message }}!&amp;lt;/strong&amp;gt;



but I can't get Rahm to say anything. {{ message }} is always empty. Can 
someone please point out what I'm doing wrong? I'm running the server in 
debug mode, not production mode.

Kindest regards,
Brandon

&lt;/pre&gt;</description>
    <dc:creator>Brandon Taylor</dc:creator>
    <dc:date>2013-05-09T02:01:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4012">
    <title>Boss_form. Simplified data processing.</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4012</link>
    <description>&lt;pre&gt;Hi today I'd like to announce my boss_form&amp;lt;https://github.com/ngaranko/boss_form&amp;gt;
.

Here's copy-paste from README.md

Simple implementation of django forms for ChicagoBoss&amp;lt;http://chicagoboss.org/&amp;gt;
.

This lib uses parameterized modules.

Main purpose of this lib is to simplify form creation and processing.
Form field definition

Fields are defined in form_fields/0 function as proplist in form 
{field_name, Options}.
&amp;lt;https://github.com/ngaranko/boss_form#field-options&amp;gt;Field Options

Required params:

   - type::atom() - field type, one of: [char_field, float_field, 
   boolean_field, choice_field, file_field ] % please refer to Field types 
   and Widgets doc&amp;lt;https://github.com/ngaranko/boss_form/blob/master/README_FIELDS_AND_WIDGETS.md&amp;gt;
   - label::string() - field label as string

Optional params:

   - required::atom() - true/false Notifies if field is required to be 
   present while checking form contents, defaults to false.
   - initial::term() - Initial value for field
   - widget::tuple() - Custom field widget in form {Module, Function}, note 
   that widget should be saved outside of parametrized modules (i.e. not in 
   form module)

Field specific params:

   - float_field can have format::string() param, this format will be used 
   by io_lib to format field value. Default: "~.2f"
   - choice_field can have choices::proplist() param, in form 
   [{value::term(), title::string()}]

&amp;lt;https://github.com/ngaranko/boss_form#examples&amp;gt;Examples

Please see examples/ directory for sample app files.

https://github.com/ngaranko/boss_form/tree/master/examples.

Regards,
Nikolay Garanko
------------------------
freenode: it_dude
blog: itdude.eu &amp;lt;http://www.itdude.eu&amp;gt;

&lt;/pre&gt;</description>
    <dc:creator>Nick Garanko</dc:creator>
    <dc:date>2013-05-08T09:48:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4006">
    <title>Getting started with the Chicago Boss tutorial</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/4006</link>
    <description>&lt;pre&gt;Hey guys,

I'm referring the tutorial at http://chicagoboss.org/tutorial.pdf, using 
Erlang R15B03 and Chicago Boss v0.8.6.

Here's my code (the application is called "twm"):

*src/controller/twm_posts_controller.erl*

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

index('GET', [])-&amp;gt;
  Posts = boss_db:find(post, []),
  {ok, [{posts, Posts}]}.

create('GET', [])-&amp;gt;
  ok;
create('POST', [])-&amp;gt;
  PostTitle = Req:post_param("title"),
  PostDescription = Req:post_param("description"),
  Post = post:new(id, PostTitle, PostDescription),

  case Post:save() of
    {ok, SavedPost} -&amp;gt;
      {redirect, [{action, "index"}]};
    {error, ErrorList} -&amp;gt;
      {ok, [{errors, ErrorList}, {post, Post}]}
  end.



*src/model/post.erl*
*
*

-module(post, [Id, Title, Description]).
-compile(export_all).


*src/view/posts/index.html*

{% if posts %}
  &amp;lt;ul&amp;gt;
    {% for post in posts %}
      &amp;lt;li&amp;gt;{{ post.title }}&amp;lt;/li&amp;gt;
    {% endfor %}
  &amp;lt;/ul&amp;gt;
{% else %}
  &amp;lt;h1&amp;gt;haha ~! Nothing here&amp;lt;/h1&amp;gt;
{% endif %}

&amp;lt;a href="/posts/create"&amp;gt;New post&amp;lt;/a&amp;gt;


*src/view/posts/**create.html*

&amp;lt;form method="post"&amp;gt;
  &amp;lt;p&amp;gt;
    Title:
    &amp;lt;br/&amp;gt;
    &amp;lt;input type="text" name="title" value="{% if post %}{{ post.title }}{% 
endif %}"/&amp;gt;
  &amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;
    Description:
    &amp;lt;br/&amp;gt;
    &amp;lt;textarea name="description"&amp;gt;
      {% if post %}{{ post.description }}{% endif %}
    &amp;lt;/textarea&amp;gt;
  &amp;lt;/p&amp;gt;
  &amp;lt;p&amp;gt;
    &amp;lt;input type="submit"/&amp;gt;
  &amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;


*Shell output:*

(twm&amp;lt; at &amp;gt;HashNuke)20&amp;gt; boss_db:find(post, []).
[{post,"post-51866f0c51b7cf2b37000001",&amp;lt;&amp;lt;"title"&amp;gt;&amp;gt;,
       &amp;lt;&amp;lt;"description"&amp;gt;&amp;gt;},
 {post,"post-5186979c51b7cf2b37000002",&amp;lt;&amp;lt;"whatever"&amp;gt;&amp;gt;,
       &amp;lt;&amp;lt;"one more"&amp;gt;&amp;gt;}]


*Here's what I'm stuck with:*

* When I visit /posts/index, I expect a list of posts, instead it says 
"nothing here" (the conditional branch in my template displays this when no 
posts are there). I do have posts in the database, when I do that. The 
shell output above lists posts that I have. I'm using MongoDB.

* When I visit /posts/create, enter form data and click submit, I expect 
the same page to be rendered with the previous data or be redirected if the 
save was successful. Instead, I get back on the same page with an empty 
form.

* I used the line "lager:info("checking this out")" in one of the 
controller actions to check if I can log data. I don't find the log message 
in the console output.

* When I use the url helper in the index template, to link to the create 
post action (/src/view/posts/create.html), like this

&amp;lt;a href="{% url action="create" %}"&amp;gt;New post&amp;lt;/a&amp;gt;


   I get the following 500 error when I visit */posts/index*

Error:

{undef,[{twm_posts_controller,module_info,[exports],[]},

        {boss_controller_lib,convert_params_to_tokens,3,

                             [{file,"src/boss/boss_controller_lib.erl"},

                              {line,5}]},

        {boss_router,unroute,6,[{file,"src/boss/boss_router.erl"},{line,47}]},

        {boss_erlydtl_tags,url,2,

                           [{file,"src/boss/boss_erlydtl_tags.erl"},

                            {line,53}]},

        {twm_view_posts_index_html,render_internal,2,[]},

        {twm_view_posts_index_html,render,2,[]},

        {boss_web_controller,render_view,6,

                             [{file,"src/boss/boss_web_controller.erl"},

                              {line,998}]},

        {boss_web_controller,process_dynamic_request,5,

                             [{file,"src/boss/boss_web_controller.erl"},

                              {line,543}]}]}



Am I doing anything wrong? If so, how do I fix and get these working?

Apologies for too many questions in the same thread. All these were related 
to the same code, so I didn't want to litter the group with multiple 
threads.


Thanks


&lt;/pre&gt;</description>
    <dc:creator>Akash Manohar J</dc:creator>
    <dc:date>2013-05-06T03:41:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3996">
    <title>invalid_authorization_specification</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3996</link>
    <description>&lt;pre&gt;Hello everyone!

Trying to get my ChicagoBoss application (which uses the pgsql db adapter) 
up and running on a different machine, I caught a snag.

./rebar compile finishes OK

Then I run ./init-dev.sh (as usual), and get this:

20:34:32.832 [info] Starting Boss in development mode....

20:34:32.875 [error] CRASH REPORT Process &amp;lt;0.85.0&amp;gt; with 0 neighbours exited 
with reason: no match of right hand value 
{error,invalid_authorization_specification} in boss_db_controller:init/1 
line 31 in gen_server:init_it/6 line 328
20:34:32.994 [error] Supervisor poolboy_sup had child boss_db_controller 
started with {boss_db_controller,start_link,undefined} at &amp;lt;0.85.0&amp;gt; exit 
with reason no match of right hand value 
{error,invalid_authorization_specification} in boss_db_controller:init/1 
line 31 in context child_terminated
20:34:33.096 [error] CRASH REPORT Process &amp;lt;0.83.0&amp;gt; with 0 neighbours exited 
with reason: no match of right hand value 
{error,{{badmatch,{error,invalid_authorization_specification}},[{boss_db_controller,init,1,[{file,"src/boss_db_controller.erl"},{line,31}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}} 
in poolboy:new_worker/2 line 348 in gen_fsm:init_it/6 line 379
20:34:33.196 [error] Supervisor boss_db_sup had child db_controller started 
with 
poolboy:start_link([{name,{local,boss_db_pool}},{worker_module,boss_db_controller},{size,5},{max_overflow,10},{adapter,...},...]) 
at undefined exit with reason no match of right hand value 
{error,{{badmatch,{error,invalid_authorization_specification}},[{boss_db_controller,init,1,[{file,"src/boss_db_controller.erl"},{line,31}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}} 
in poolboy:new_worker/2 line 348 in context start_error
20:34:33.285 [error] gen_server &amp;lt;0.84.0&amp;gt; terminated with reason: no match 
of right hand value 
{error,{{badmatch,{error,invalid_authorization_specification}},[{boss_db_controller,init,1,[{file,"src/boss_db_controller.erl"},{line,31}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}} 
in poolboy:new_worker/2 line 348
20:34:33.375 [error] CRASH REPORT Process &amp;lt;0.84.0&amp;gt; with 0 neighbours exited 
with reason: no match of right hand value 
{error,{{badmatch,{error,invalid_authorization_specification}},[{boss_db_controller,init,1,[{file,"src/boss_db_controller.erl"},{line,31}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}} 
in poolboy:new_worker/2 line 348 in gen_server:terminate/6 line 747
20:34:33.464 [error] Supervisor boss_sup had child boss_web_controller 
started with boss_web_controller:start_link([{ip,"0.0.0.0"},{port,8001}]) 
at undefined exit with reason shutdown in context start_error
20:34:33.554 [info] Application boss exited with reason: 
{shutdown,{boss_app,start,[normal,[]]}}

Boss seems to be having trouble connecting to the database 
("invalid_authorization_specification"). But I have the database configured 
as usual. Any ideas where to go from here?

Stumped,
Nathan

&lt;/pre&gt;</description>
    <dc:creator>Smithfarm</dc:creator>
    <dc:date>2013-05-05T18:49:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3994">
    <title>filters from erlydtl in controler code</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3994</link>
    <description>&lt;pre&gt;I need to return some unsafe strings (user input) from controller to 
template in ajax response, and write these strings into web page in ajax 
success callback. So I cannot use filters in template in this case, and 
these strings are unescaped. How can I escape the string in controller 
code? 
Is there a way to call erlydtl filters in controller, like it is in Django?

&lt;/pre&gt;</description>
    <dc:creator>Evgeny M</dc:creator>
    <dc:date>2013-05-04T19:58:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3991">
    <title>Routes not found in production mode</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3991</link>
    <description>&lt;pre&gt;I'm not sure why this happens, but when I try to deploy my application on a 
remote server and start in production mode ("./init.sh start"), the routes 
file is not found.  However if I start it in development mode, then 
everything is good.

It's worth noting that both development mode and production mode run 
normally on my local machine.

&lt;/pre&gt;</description>
    <dc:creator>Derek Chiang</dc:creator>
    <dc:date>2013-05-03T08:42:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3988">
    <title>Non-default path to erlang WM</title>
    <link>http://comments.gmane.org/gmane.comp.lang.erlang.chicagoboss/3988</link>
    <description>&lt;pre&gt;Hi,
How can I make CB application to use non-default Erlang WM? I have the WM 
in a subdir of the project, and want to use in instead of system erlang.
Are there any ways to do this besides changing the path in 
ChicagoBoss/priv/rebar/boss-rebar.erl ?


And a second question
Do I use the right syntax If I want to compile with encrypted debug info: 
{compiler_options, [{debug_info_key,"my_sikrit_key"}]}, ?

&lt;/pre&gt;</description>
    <dc:creator>Evgeny M</dc:creator>
    <dc:date>2013-05-02T11:44:45</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.erlang.chicagoboss">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.erlang.chicagoboss</link>
  </textinput>
</rdf:RDF>
