Rails 3.1 branch

60 views
Skip to first unread message

Malcolm Locke

unread,
Sep 20, 2011, 7:05:39 AM9/20/11
to Fulcrum Devel
I've just pushed a rails 3.1 branch, based on a pull request received
from Bradley Priest - https://github.com/malclocke/fulcrum/pull/23

If anyone feels like trying it out, please go ahead and report any
problems. I'd like to eventually switch the mainline to Rails 3.1, but
would like to iron out any problems before the switch and ideally get a
lot of eyes on it.

In particular, it doesn't look like things are going to work out of the
box on Heroku, so the README will need updating with working
instructions.

Malc

Bradley Priest

unread,
Sep 20, 2011, 6:05:11 PM9/20/11
to Fulcrum Devel
Hey Malc,
I was looking into getting it to work nicely on Heroku.
I've got it running fine with local asset precompilation, however
there is a bug when using the Heroku asset compilation related to
devise wanting to talk to the database in the rake task.
I'll put together an updated README and try and have a look at the
rake task tonight.

Brad

On Sep 20, 11:05 pm, Malcolm Locke <m...@wholemeal.co.nz> wrote:
> I've just pushed a rails 3.1 branch, based on a pull request received
> from Bradley Priest -https://github.com/malclocke/fulcrum/pull/23

Tom Harrison

unread,
Mar 1, 2012, 11:42:26 AM3/1/12
to fulcru...@googlegroups.com
Hi Brad and Malc --

I just pulled the Rails 3.1 branch and everything seems to be working locally.  (Note for other readers -- if you tried the master version first, you'll have to delete your session cookie before the 3.1 version will work).

I haven't tried pushing to Heroku yet, but I think I know how to deal with the error you're seeing (The Heroku docs have some tips, and I have done battle with Devise before :-).

I am wondering where this branch stands -- do you expect to merge to master?  Have you tried?  Rails 3.2 is nice, too (and trivial to upgrade, compared to the 3.0 => 3.1 changes).

If it would be worth the effort to you guys and a working result would likely end up on master, I would be happy to give it a whirl (mostly, my interest is in evaluating backbone.js for Rails).

Hope to hear your thoughts,

Tom Harrison

Tom Harrison

unread,
Mar 1, 2012, 3:26:04 PM3/1/12
to fulcru...@googlegroups.com
Quick followup: merge seemed mostly straightforward -- most changes are asset-related, and the rest seem straightforward.

However, it looks like compass or sass are unhappy generating or referencing sprites.  I did find one reference to an issue with Rails 3.1.0, so moved up to 3.1.3 ... no better.  I am not a Compass ninja yet.

When loading the application layout (in other words, just as the app is loading), I am getting:
File to import not found or unreadable: icon/*.png.
Load path: Sass::Rails::Importer(/Users/tharrison/Sites/fulcrum/app/assets/stylesheets/icons.css.scss)
  (in /Users/tharrison/Sites/fulcrum/app/assets/stylesheets/icons.css.scss)
Something stupid, no doubt.  

Tom

Malcolm Locke

unread,
Mar 1, 2012, 4:11:52 PM3/1/12
to fulcru...@googlegroups.com
Hi Tom,

I have previously not been too worried about upgrading to 3.1, but it's
come on my radar of late as I'm planning to do a fair bit of
refactoring, including moving to JST templates. Having the asset
pipeline available would be a real bonus for this.

It's been quite a while since I tried, so hopefully some of the glitches
with Heroku can be worked through.

If you could make a pull request with any of your fixes based off of
Bradley's work that would be great, and we can get the ball rolling on
this again. I'm quite happy for the master branch to go to Rails 3.1 if
we can get it all working nicely.

Malc

On Thu, Mar 01, 2012 at 12:26:04PM -0800, Tom Harrison wrote:
> Quick followup: merge seemed mostly straightforward -- most changes are
> asset-related, and the rest seem straightforward.
>
> However, it looks like compass or sass are unhappy generating or

> referencing sprites. I did find one reference to an issue with Rails 3.1.0<https://github.com/compass/compass-rails>,

Tom Harrison

unread,
Mar 1, 2012, 4:58:14 PM3/1/12
to fulcru...@googlegroups.com
Cool!  I'll fumble around a little more to see if I can make my merged branch work.  Might be worth just going to Rails 3.2 (although that does depend on ruby 1.9.3, which might be an issue with Heroku).

Anyway, I'll do this the official way and maybe Brad might have some ideas for getting over my Compass/SASS hurdles.

Nice to meet you!

Tom

Malcolm Locke

unread,
Mar 1, 2012, 5:31:54 PM3/1/12
to fulcru...@googlegroups.com
Would prefer to let the dust settle on Rails 3.2 a little first.

Look forward to welcoming your first contributions ;)

Malc

Bradley Priest

unread,
Mar 1, 2012, 8:41:54 PM3/1/12
to Fulcrum Devel
Hey guys,
It has been a while since I've taken a look at the 3.1 branch, had a
quick play at Railscamp but the merging was a bit much effort than I
was willing to put in at the time.
A few of the changes I made, have since been backported to the master
version so I'm not surprised there was some serious issues with the
merge.
If Malcolm is ready to move master to 3.1 then I'm happy to have a
look at the branch again.

Tom, if you could give me an idea how things came along with the
merging that'd be great.
I don't think a merge is going to be the best bet here, more likely
just cherry-pick the relevant commits.
I can almost guarantee the compass problems are because when I
backported the spriting I changed the name of them from 'icons' to
'icon'.

Brad

Tom Harrison

unread,
Mar 1, 2012, 8:46:37 PM3/1/12
to fulcru...@googlegroups.com
Brad -- thanks for the lead on icon != icons.  Sounds like a likely scenario.  I'll keep poking.

Tom Harrison

unread,
Mar 2, 2012, 5:21:25 PM3/2/12
to fulcru...@googlegroups.com
Hi again gentlemen --

Well.... I did get the app working by merging Bradley's rails3.1 branch with his forked version of master.  It took about 10 minutes, and then another hour to hunt down a few little things.  These simple changes other than obvious merges got the app functional:
  • rename jquery.tagit to jquery_tagit and update application.css.scss and screen.css.scss
  • remove bootstrap-twipsy import from screen.css.scss (or perhaps add the required file)
So if this (trivial) effort is worth it, I am happy to push the changes to a new branch on Bradley's fork ... but perhaps it's easier just to do the merge I did.  It's really short and sweet.

Let me know if you need more info.

I do think catching up to where backbone and rails seem to be heading is a worthy goal -- the rails-backbone gem is pretty nice and provides a opinionated structure that works with asset pipeline, and EJS templates (both very Rails-y concepts). 

Tom

On Thursday, March 1, 2012 8:46:37 PM UTC-5, Tom Harrison wrote:
Brad -- thanks for the lead on icon != icons.  Sounds like a likely scenario.  I'll keep poking.

Bradley Priest

unread,
Mar 2, 2012, 11:33:24 PM3/2/12
to Fulcrum Devel
Sweet, did the icon/icons thing fix the compass problems?
If you've got it all working no need for me to remerge, have you got
your merged branch up somewhere where I can take a quick look, might
as well create a PR on Github for it and get some opinions, it's been
a while since I've looked at the 3.1 code to be honest.

It'll be good to get a functional, up-to-date 3.1 version up and
running and then I'm sure people can start thinking about
restructuring the codebase.

Brad

On Mar 3, 11:21 am, Tom Harrison <tom.harrison...@gmail.com> wrote:
> Hi again gentlemen --
>
> Well.... I did get the app working by merging Bradley's rails3.1 branch
> with his forked version of master.  It took about 10 minutes, and then
> another hour to hunt down a few little things.  These simple changes other
> than obvious merges got the app functional:
>
>    - rename jquery.tagit to jquery_tagit and update application.css.scss
>    and screen.css.scss
>    - remove bootstrap-twipsy import from screen.css.scss (or perhaps add
> ...
>
> read more »

Tom Harrison

unread,
Mar 3, 2012, 12:55:09 PM3/3/12
to fulcru...@googlegroups.com
OK, so there's a PR out there for you, but I think I went the "wrong direction" (merge master into rails3.1, not rails3.1 into master).  I am not yet a git ninja, to say the least.  

Perhaps that PR is worth something, but if not, let me know and I'll try doing it properly.

Tom

Tom Harrison

unread,
Mar 3, 2012, 1:29:57 PM3/3/12
to fulcru...@googlegroups.com
Another PR, merging rails31 onto master, which I think is the one you want.  Works for me on ruby 1.9.2-p290, tests pass (except suspected timezone issue in jasmine).

Tom

Malcolm Locke

unread,
Mar 4, 2012, 5:05:06 AM3/4/12
to fulcru...@googlegroups.com
Tom,

I just tried merging this against my master and there are a pretty huge
number of merge conflicts. This is basically due to the branch you are
working from (Bradley's 3.1 branch) being about 5 months behind
mainline.

I think we probably just need to start from scratch from my master as
merging this is going to be too difficult as it stands. I'd suggest the
following:

- Rebase or cherry pick Bradley's 3.1 branch against my master, and fix
up as necessary. I think cherry pick will probably be the best
strategy, as previously stated by Bradley.
- Apply your extra changes on top of this.

Anyone like to tackle this? If not I'll do so myself, hopefully over
the next few days.

Malc

> >> > read more �
> >
> >

Bradley Priest

unread,
Mar 4, 2012, 2:31:58 PM3/4/12
to Fulcrum Devel
I'll have a look at rebasing it tonight.

Cheers
> > >> > >> wrote:...
>
> read more »

Tom Harrison

unread,
Mar 4, 2012, 5:51:34 PM3/4/12
to fulcru...@googlegroups.com
Yeah, that's kind of what I figured...

I am happy to knock away at Rails or gem issues if you or Bradley are able to bring things up to being current.  I have experience with most of the gems in use and Rails 3.1/asset pipeline, so I might be useful in sorting out version-related issues.  Still learning backbone, but that doesn't seem to be a primary source of issues as far as I can see.

Tom

> >> > read more �
> >
> >

Malcolm Locke

unread,
Mar 5, 2012, 3:12:33 AM3/5/12
to fulcru...@googlegroups.com
BOOM!

Massive thanks to Bradley and Tom for pushing this along. I've pushed
this to master now, let's see if it sticks!

This will simplify the refactoring of the JS views, which is long
overdue, and make the step up to Rails 3.2 a lot easier.

Looks like Travis CI is throwing up a build error on Ruby 1.9.2, but
apart from that everything looks sweet from my end.

Thanks again guys,

Malc

> > read more �

Tom Harrison

unread,
Mar 5, 2012, 9:10:05 AM3/5/12
to fulcru...@googlegroups.com
Boom indeed! :-)

I pulled from malclocke/master and all seems well to me; specs and jasmine tests all pass, and deploy to Heroku worked :-)

A couple minor issues:
  • The readme says to pull from the branch (git checkout rails3.1)
  • The readme also might mention that you need at least Rails 3.1.1 ... although dunno -- the bundle installs 3.1.4, so maybe not an issue
  • I got an error on the heroku run rake db:setup and got a server error after trying to confirm -- both seem related to sending email
>heroku run rake db:setup
Running rake db:setup attached to terminal... up, run.1
...<snip>...
-- assume_migrated_upto_version(20111009095221, ["/app/db/migrate"])
   -> 0.0838s

Sent mail to te...@example.com (3076ms)
rake aborted!
Connection refused - connect(2)

Tasks: TOP => db:setup => db:seed

And the server error when sending to a valid email address, likely related...

2012-03-05T13:37:17+00:00 app[web.1]: Started POST "/users" for 146.115.132.76 at 2012-03-05 13:37:17 +0000
2012-03-05T13:37:20+00:00 app[web.1]: 
2012-03-05T13:37:20+00:00 app[web.1]: Sent mail to tom...@gmail.com (3078ms)
2012-03-05T13:37:20+00:00 app[web.1]: 
2012-03-05T13:37:20+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2012-03-05T13:37:20+00:00 app[web.1]:   
2012-03-05T13:37:20+00:00 app[web.1]: 
2012-03-05T13:37:20+00:00 app[web.1]: 
2012-03-05T13:37:20+00:00 app[web.1]: cache: [POST /users] invalidate, pass
2012-03-05T13:37:20+00:00 app[web.1]:   Processing by RegistrationsController#create as HTML
2012-03-05T13:37:20+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"VQyWZqR4x6b+HWN1YQ1qKYPqSTIiVuDMBBB5e4ZBB0g=", "user"=>{"name"=>"Tom Harrison", "initials"=>"TH", "email"=>"tom...@gmail.com"}, "commit"=>"Sign up"}
2012-03-05T13:37:20+00:00 app[web.1]: Rendered devise/mailer/confirmation_instructions.html.erb (0.7ms)
2012-03-05T13:37:20+00:00 heroku[router]: POST fulcrum-tharrison.herokuapp.com/users dyno=web.1 queue=0 wait=0ms service=3547ms status=500 bytes=728
2012-03-05T13:37:20+00:00 app[web.1]: Completed 500 Internal Server Error in 3521ms

I'll try later and see if this is just a timing issue.  I am sure there's a way to create the seed user without sending the confirmation email.

Anyway, brilliant!!

Tom

On Monday, March 5, 2012 3:12:33 AM UTC-5, malclocke wrote:
BOOM!

Massive thanks to Bradley and Tom for pushing this along.  I've pushed
this to master now, let's see if it sticks!

This will simplify the refactoring of the JS views, which is long
overdue, and make the step up to Rails 3.2 a lot easier.

Looks like Travis CI is throwing up a build error on Ruby 1.9.2, but
apart from that everything looks sweet from my end.

Thanks again guys,

Malc

On Sun, Mar 04, 2012 at 11:31:58AM -0800, Bradley Priest wrote:
> I'll have a look at rebasing it tonight.
>
> Cheers
>
> On Mar 4, 11:05�pm, Malcolm Locke <m...@wholemeal.co.nz> wrote:
> > Tom,
> >
> > I just tried merging this against my master and there are a pretty huge

> > number of merge conflicts. �This is basically due to the branch you are


> > working from (Bradley's 3.1 branch) being about 5 months behind
> > mainline.
> >
> > I think we probably just need to start from scratch from my master as

> > merging this is going to be too difficult as it stands. �I'd suggest the


> > following:
> >
> > - Rebase or cherry pick Bradley's 3.1 branch against my master, and fix

> > � up as necessary. �I think cherry pick will probably be the best
> > � strategy, as previously stated by Bradley.


> > - Apply your extra changes on top of this.
> >

> > Anyone like to tackle this? �If not I'll do so myself, hopefully over


> > the next few days.
> >
> > Malc
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Mar 03, 2012 at 10:29:57AM -0800, Tom Harrison wrote:
> > > Another PR, merging rails31 onto master, which I think is the one you want.

> > > �Works for me on ruby 1.9.2-p290, tests pass (except suspected timezone


> > > issue in jasmine).
> >
> > > Tom
> >
> > > On Saturday, March 3, 2012 12:55:09 PM UTC-5, Tom Harrison wrote:
> >
> > > > OK, so there's a PR out there for you, but I think I went the "wrong

> > > > direction" (merge master into rails3.1, not rails3.1 into master). �I am


> > > > not yet a git ninja, to say the least.
> >
> > > > Perhaps that PR is worth something, but if not, let me know and I'll try
> > > > doing it properly.
> >
> > > > Tom
> >
> > > > On Friday, March 2, 2012 11:33:24 PM UTC-5, Bradley Priest wrote:
> >
> > > >> Sweet, did the icon/icons thing fix the compass problems?
> > > >> If you've got it all working no need for me to remerge, have you got
> > > >> your merged branch up somewhere where I can take a quick look, might
> > > >> as well create a PR on Github for it and get some opinions, it's been
> > > >> a while since I've looked at the 3.1 code to be honest.
> >
> > > >> It'll be good to get a functional, up-to-date 3.1 version up and
> > > >> running and then I'm sure people can start thinking about
> > > >> restructuring the codebase.
> >
> > > >> Brad
> >
> > > >> On Mar 3, 11:21 am, Tom Harrison <tom.harrison...@gmail.com> wrote:
> > > >> > Hi again gentlemen --
> >
> > > >> > Well.... I did get the app working by merging Bradley's rails3.1 branch

> > > >> > with his forked version of master. �It took about 10 minutes, and then
> > > >> > another hour to hunt down a few little things. �These simple changes


> > > >> other
> > > >> > than obvious merges got the app functional:
> >

> > > >> > � �- rename jquery.tagit to jquery_tagit and update
> > > >> application.css.scss
> > > >> > � �and screen.css.scss
> > > >> > � �- remove bootstrap-twipsy import from screen.css.scss (or perhaps
> > > >> add
> > > >> > � �the required file)


> >
> > > >> > So if this (trivial) effort is worth it, I am happy to push the changes
> > > >> to
> > > >> > a new branch on Bradley's fork ... but perhaps it's easier just to do
> > > >> the

> > > >> > merge I did. �It's really short and sweet.


> >
> > > >> > Let me know if you need more info.
> >
> > > >> > I do think catching up to where backbone and rails seem to be heading
> > > >> is a
> > > >> > worthy goal -- the rails-backbone gem is pretty nice and provides a
> > > >> > opinionated structure that works with asset pipeline, and EJS templates
> > > >> > (both very Rails-y concepts).
> >
> > > >> > Tom
> >
> > > >> > On Thursday, March 1, 2012 8:46:37 PM UTC-5, Tom Harrison wrote:
> >

> > > >> > > Brad -- thanks for the lead on icon != icons. �Sounds like a likely
> > > >> > > scenario. �I'll keep poking.

> > > >> > >> > > Cool! �I'll fumble around a little more to see if I can make my
> > > >> merged
> > > >> > >> > > branch work. �Might be worth just going to Rails 3.2 (although


> > > >> that
> > > >> > >> does
> > > >> > >> > > depend on ruby 1.9.3, which might be an issue with Heroku).
> >
> > > >> > >> > > Anyway, I'll do this the official way and maybe Brad might have
> > > >> some
> > > >> > >> ideas
> > > >> > >> > > for getting over my Compass/SASS hurdles.
> >
> > > >> > >> > > Nice to meet you!
> >
> > > >> > >> > > Tom
> >
> > > >> > >> > > On Thursday, March 1, 2012 4:11:52 PM UTC-5, malclocke wrote:
> >
> > > >> > >> > > > Hi Tom,
> >
> > > >> > >> > > > I have previously not been too worried about upgrading to 3.1,
> > > >> but
> > > >> > >> it's
> > > >> > >> > > > come on my radar of late as I'm planning to do a fair bit of

> > > >> > >> > > > refactoring, including moving to JST templates. �Having the


> > > >> asset
> > > >> > >> > > > pipeline available would be a real bonus for this.
> >
> > > >> > >> > > > It's been quite a while since I tried, so hopefully some of
> > > >> the
> > > >> > >> glitches
> > > >> > >> > > > with Heroku can be worked through.
> >
> > > >> > >> > > > If you could make a pull request with any of your fixes based
> > > >> off of
> > > >> > >> > > > Bradley's work that would be great, and we can get the ball
> > > >> rolling
> > > >> > >> on

> > > >> > >> > > > this again. �I'm quite happy for the master branch to go to


> > > >> Rails
> > > >> > >> 3.1 if
> > > >> > >> > > > we can get it all working nicely.
> >
> > > >> > >> > > > Malc
> >
> > > >> > >> > > > On Thu, Mar 01, 2012 at 12:26:04PM -0800, Tom Harrison wrote:
> > > >> > >> > > > > Quick followup: merge seemed mostly straightforward -- most
> > > >> > >> changes are
> > > >> > >> > > > > asset-related, and the rest seem straightforward.
> >
> > > >> > >> > > > > However, it looks like compass or sass are unhappy
> > > >> generating or

> > > >> > >> > > > > referencing sprites. �I did find one reference to an issue


> > > >> with
> > > >> > >> Rails
> > > >> > >> > > > 3.1.0<https://github.com/compass/compass-rails>,

> > > >> > >> > > > > so moved up to 3.1.3 ... no better. �I am not a Compass


> > > >> ninja yet.
> >
> > > >> > >> > > > > When loading the application layout (in other words, just as
> > > >> the
> > > >> > >> app is
> > > >> > >> > > > > loading), I am getting:
> >
> > > >> > >> > > > > File to import not found or unreadable: icon/*.png.
> > > >> > >> > > > > Load path:
> >
> > > >> Sass::Rails::Importer(/Users/tharrison/Sites/fulcrum/app/assets/stylesheets
> > > >> > >> /icons.css.scss)

> > > >> > >> > > > > � (in


> >
> > > >> /Users/tharrison/Sites/fulcrum/app/assets/stylesheets/icons.css.scss)
> >
> > > >> > >> > > > > Something stupid, no doubt.
> >
> > > >> > >> > > > > Tom
> >
> > > >> > >> > > > > On Thursday, March 1, 2012 11:42:26 AM UTC-5, Tom Harrison
> > > >> wrote:
> >
> > > >> > >> > > > > > Hi Brad and Malc --
> >
> > > >> > >> > > > > > I just pulled the Rails 3.1 branch and everything seems to
> > > >> be
> > > >> > >> working

> > > >> > >> > > > > > locally. �(Note for other readers -- if you tried the


> > > >> master
> > > >> > >> version
> > > >> > >> > > > first,
> > > >> > >> > > > > > you'll have to delete your session cookie before the 3.1
> > > >> > >> version will
> > > >> > >> > > > work).
> >
> > > >> > >> > > > > > I haven't tried pushing to Heroku yet, but I think I know
> > > >> how
> > > >> > >> to deal
> > > >> > >> > > > with
> > > >> > >> > > > > > the error you're seeing (The Heroku docs have some tips,
> > > >> and I
> > > >> > >> have
> > > >> > >> > > > done
> > > >> > >> > > > > > battle with Devise before :-).
> >
> > > >> > >> > > > > > I am wondering where this branch stands -- do you expect
> > > >> to
> > > >> > >> merge to

> > > >> > >> > > > > > master? �Have you tried? �Rails 3.2 is nice, too (and

> > read more �

Bradley Priest

unread,
Mar 5, 2012, 2:07:16 PM3/5/12
to Fulcrum Devel
Cheers Tom,
I've already put in a PR about the git checkout rails3.1 thing didn't
notice the dependency thing, probably worth updating that too.

As for the rest, can you check that the sendgrid add-on is set up on
your heroku instance properly, it might just be a config problem.

Brad

On Mar 6, 3:10 am, Tom Harrison <tom.harrison...@gmail.com> wrote:
> Boom indeed! :-)
>
> I pulled from malclocke/master and all seems well to me; specs and jasmine
> tests all pass, and deploy to Heroku worked :-)
>
> A couple minor issues:
>
>    - The readme says to pull from the branch (git checkout rails3.1)
>    - The readme also might mention that you need at least Rails 3.1.1 ...
>    although dunno -- the bundle installs 3.1.4, so maybe not an issue
>    - I got an error on the heroku run rake db:setup and got a server error
>    after trying to confirm -- both seem related to sending email
>
> >heroku run rake db:setup
>
> Running rake db:setup attached to terminal... up, run.1
> ...<snip>...
> -- assume_migrated_upto_version(20111009095221, ["/app/db/migrate"])
>    -> 0.0838s
>
> Sent mail to t...@example.com (3076ms)
> > > > > >> > >> > > > It's been quite...
>
> read more »

Tom Harrison

unread,
Mar 5, 2012, 2:35:09 PM3/5/12
to fulcru...@googlegroups.com
Thanks Brad --

I think the sendgrid thing was just a waiting issue ... it's working now :-)

One more possible addition for the readme: for some reason, APP_NAME was not set on heroku (heroku config --app fulcrum-tharrison), so the email came with a bad URL for account confirmation.  Simply setting the variable resolved the problem (heroku config:add APP_NAME=fulcrum-tharrison --app fulcrum-tharrison).  I am not sure if this is specific to me -- if not, perhaps another config item for the readme?

All in all, pretty cool.

Tom

Malcolm Locke

unread,
Mar 5, 2012, 3:46:54 PM3/5/12
to fulcru...@googlegroups.com
On Mon, Mar 05, 2012 at 11:35:09AM -0800, Tom Harrison wrote:
> Thanks Brad --
>
> I think the sendgrid thing was just a waiting issue ... it's working now :-)
>
> One more possible addition for the readme: for some reason, APP_NAME was
> not set on heroku (heroku config --app fulcrum-tharrison), so the email
> came with a bad URL for account confirmation. Simply setting the variable
> resolved the problem (heroku config:add APP_NAME=fulcrum-tharrison --app
> fulcrum-tharrison). I am not sure if this is specific to me -- if not,
> perhaps another config item for the readme?

Looks like that's not set on Heroku cedar or bamboo. That one must have
slipped past me without being verified, unless it used to be defined on
heroku but they have since removed it, which I doubt.

I think options like that need to be extracted out to a config file that
isn't in source control, I'll put it in the backlog.

Malc

Tom Harrison

unread,
Mar 5, 2012, 5:42:37 PM3/5/12
to fulcru...@googlegroups.com
Following the current approach, this sounds like a "settings" thing to me, perhaps even in the database, or something to set in one of the initializers.  It's far from onerous to have to set this up (http://devcenter.heroku.com/articles/config-vars), and anyone deploying the app may not necessarily use Heroku...

But the host is likely to vary (e.g. dev/test/staging/production environments), and also might be something that changes (e.g if you change email providers, or CNAME the DNS to something different).

An approach I have used frequently is to assume the email should return to the server from which the request originated -- which should be available in request.header object.  This solves all of the above problems without configuration.  

The trick here is to get Devise to cooperate.  We did some stuff in an app I worked on recently that replaced the Devise messages with our own (and layout, etc.) so we just used the view helpers (url_for, link_to).  This may or may not be as easy with externalized messages (e.g. in I18N.yaml files).

If you think this is a viable alternative to specifying the values in the environments configs, then I'll work on that little detail.

Tom
Reply all
Reply to author
Forward
0 new messages