Heroku integration

56 views
Skip to first unread message

jayth...@gmail.com

unread,
Nov 14, 2008, 11:28:40 AM11/14/08
to Spree
Hi... I just want to know how could I apply this application in
heroku? My application is already running while in the localhost mode.
but when I deploy it in heroku, It only shows the same window as
creating a new application. Hope anyone can help me. Thanks!

schof

unread,
Nov 15, 2008, 11:45:29 AM11/15/08
to Spree
In response to your github message...

You can change the version of rails used by your application
regardless of what version Heroku has. Just put a version of Rails
2.2 in vendor/rails. You can google "freezing rails" for more info
(or see the Spree wiki.)

Sean

jayth...@gmail.com

unread,
Nov 16, 2008, 6:21:57 AM11/16/08
to Spree
Hi, I tried freezing it but the rails folder didn't appeared in the
vendors folder when
I deploy it to heroku. I think heroku has it's custom patch. could you
tell me other
ways to deploy it? it's working in my machine but not in heroku.

Sean Schofield

unread,
Nov 17, 2008, 9:23:57 AM11/17/08
to spree...@googlegroups.com
Sounds like heroku is not allowing you to supply your own vendor/
rails. Not sure what the reasoning behind that could possibly be but
I guess you're stuck with the version of Rails they are supplying you
with.

From what I can tell heroku is using Rails 2.1 (at least in the one
screencast I saw.) So I would go with an earlier version of Spree
which is Rails 2.1 compatible (we only recently started requiring
Rails 2.1.2) You could use the tagged version for 0.4.0 or you could
use the 0.4.1 gem.

Sean

Arjay Orcasitas

unread,
Nov 18, 2008, 1:37:19 AM11/18/08
to spree...@googlegroups.com
hi sir, I've already done what you've said. I encountered this problem,

no such file to load -- has_many_polymorphs /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in `require' /usr/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/gem_dependency.rb:57:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `__send__' /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/symbol.rb:11:in `to_proc'{...}

These gems that this application depends on are missing: - has_many_polymorphs - highline - mini_magick - activemerchant - tlsmail Run "rake gems:install" to install them.


I've already installed all the necessary gems but still this error occurs.

Sean Schofield

unread,
Nov 18, 2008, 7:51:21 AM11/18/08
to spree...@googlegroups.com
> These gems that this application depends on are missing: -
> has_many_polymorphs - highline - mini_magick - activemerchant - tlsmail Run
> "rake gems:install" to install them.

Can you install gems with heroku? You can try 'rake gems' from the
command line to see if you have the necessary gems (and the specific
version required.) Most likely 'rake gems' will show those same gems
missing as when you try to run it.

If 'rake gems:install' won't install the missing gems then your only
other option is to unpack the relevant gems locally on your machine,
put them in vendor/gems for your spree source and deploy the whole app
with the gems "frozen" in your source.

Good Luck.

Sean

Arjay Orcasitas

unread,
Nov 18, 2008, 9:09:24 AM11/18/08
to spree...@googlegroups.com
Thank you sir for the help. I've already deployed my application in heroku. I'll create a screencast later. Thank you!

Sean Schofield

unread,
Nov 18, 2008, 9:19:29 AM11/18/08
to spree...@googlegroups.com
> Thank you sir for the help. I've already deployed my application in
> heroku. I'll create a screencast later. Thank you!

Screencast for heroku would be cool. Also, please consider adding to
the wiki how you got it working.

schof

unread,
Nov 18, 2008, 7:36:32 PM11/18/08
to Spree
Now you have got me interested in Heroku and Spree :-)

Please do a blog post or something on this so we can all learn what
you did. I'm also curious how you resolved the Rails 2.1.2 problem?
Did you use an earlier version of Spree or did you just change the
Rails Version in the Spree code? I bet the current code works with
Rails 2.1.0 if you changed the required Rails version only - but I'm
curious to know for sure.

Sean

Arjay Orcasitas

unread,
Nov 19, 2008, 9:07:07 AM11/19/08
to spree...@googlegroups.com
I just used an earlier version of spree but put those missing gems manually. I'll create a
blog post and screencast after our defense. thank you again sir!

Arjay Orcasitas

unread,
Nov 19, 2008, 3:32:59 PM11/19/08
to spree...@googlegroups.com
update on my pr0j:

I've already integrated the latest spree rep0sit0ry on her0ku. As I've
pr0mised, I'll create a screencast. Thank y0u all f0r the help.

Martin Häger

unread,
Feb 2, 2009, 2:10:46 AM2/2/09
to Arjay Orcasitas, spree...@googlegroups.com
Hello,

I've have deployed Spree (2009-01-31 git HEAD version) on Heroku, but
product image uploading isn't fully working. It is only uploading the
'original' image to the server, and not creating the 'mini', 'small'
and 'product' images. On my local machine, everything works as it
should. Any ideas what might be wrong?

I'm attaching the log/development.log files from both my local machine
(localhost.log) and Heroku (herokugarden.log). Notice the deviation on
row 4 and 5 in the Heroku log.

localhost.log:
http://gist.github.com/raw/56656/17e5a316289362372b7eb4aaff3cbe1585787f9b/localhost.log

herokugarden.log:
http://gist.github.com/raw/56653/82d802fba561615a89582d5d4b07f4d811159420/herokugarden.log

(the logs look better when viewed with ANSI color support, like 'more'
or 'less -r')

Output from 'rake gems' on Heroku:
- [F] highline = 1.4.0
- [F] activemerchant = 1.4.1
- [I] activesupport = 2.2.2
- [I] builder = 2.1.2
- [F] tlsmail
- [F] active_presenter = 0.0.4
- [F] activerecord-tableless = 0.1.0
- [I] activerecord = 2.2.2

Cheers,
Martin

On Nov 19 2008, 9:32 pm, "Arjay Orcasitas" <jaythre...@gmail.com>
wrote:


> update on my pr0j:
>
> I've already integrated the latest spree rep0sit0ry on her0ku. As I've
> pr0mised, I'll create a screencast. Thank y0u all f0r the help.
>

> On 11/19/08, Arjay Orcasitas <jaythre...@gmail.com> wrote:
>
> > I just used an earlier version of spree but put those missing gems manually.
> > I'll create a
> > blog post and screencast after our defense. thank you again sir!
>

> > On Wed, Nov 19, 2008 at 8:36 AM, schof <sean.schofi...@gmail.com> wrote:
>
> >> Now you have got me interested inHerokuand Spree :-)

Sean Schofield

unread,
Feb 2, 2009, 7:42:17 AM2/2/09
to spree...@googlegroups.com
> I've have deployed Spree (2009-01-31 git HEAD version) on Heroku, but
> product image uploading isn't fully working. It is only uploading the
> 'original' image to the server, and not creating the 'mini', 'small'
> and 'product' images. On my local machine, everything works as it
> should. Any ideas what might be wrong?

Most likely Heroku is missing the Image Magick binary. That's a C
library - not a ruby thing. I've never tried uploading images on
Heroku so I can't say for sure but seems like the most likely
explanation.

Sean

Martin Häger

unread,
Feb 2, 2009, 1:58:20 PM2/2/09
to Spree
Right. And here's probably why no errors are logged:
http://thoughtbot.lighthouseapp.com/projects/8794/tickets/51-paperclip-fails-silently-if-imagemagick-is-not-in-path

The Heroku guys seem to have ImageMagick under evaluation atm, so
hopefully it will be installed soon.

Thanks for the input.

Sean Schofield

unread,
Feb 2, 2009, 2:14:43 PM2/2/09
to spree...@googlegroups.com
> The Heroku guys seem to have ImageMagick under evaluation atm, so
> hopefully it will be installed soon.

You're just playing around with Spree right? I'm not sure I'd go with
Heroku for a production deployment. Too many limitations IMO (such as
this.)

Sean

Martin Häger

unread,
Feb 3, 2009, 2:44:56 AM2/3/09
to Spree
Actually, we're building an e-commerce application on top of Spree for
a university project. The course isn't so much about programming as
about developing and documenting according to ISO/IEEE standards.
We'll just be running an "online demo" on Heroku for six weeks.
Therefore, I only had two requirements: it should be free, and we
should be able to push to it via Git. Enter Heroku! :)

Sean Schofield

unread,
Feb 3, 2009, 7:45:36 AM2/3/09
to spree...@googlegroups.com
> Actually, we're building an e-commerce application on top of Spree for
> a university project. The course isn't so much about programming as
> about developing and documenting according to ISO/IEEE standards.
> We'll just be running an "online demo" on Heroku for six weeks.
> Therefore, I only had two requirements: it should be free, and we
> should be able to push to it via Git. Enter Heroku! :)

Yes Heroku seems to be popular with university students who want a
free server. Not sure if that's the best business model for them but
it works for you. Good luck on the project.

Sean

Reply all
Reply to author
Forward
0 new messages