Why is this Eventmachine process being terminated?

2010-12-15 Thread Jonas
Hi guys,

So I've been having some issues running an eventmachine worker on
Heroku. After some tedious debugging I realized that it didn't appear
to be what the event machine was doing that caused the problem. A
simple eventmachine loops that does nothing but logging a tick every
second is killed as well.

My problem:
The eventmachine process is being terminated within 15 seconds from
start. A SystemExit exception is thrown.

My setup:
The rake task jobs:work uses the daemons gem to start a new daemon
that runs the eventmachine reactor.

Here is the three simple files used: 
https://gist.github.com/061ab6973843c31dace3
And the logged output: https://gist.github.com/b7beaeed48b8059efc4b

What makes it this difficult to have an EM-process running?

It's running perfectly on a local machine, of course.

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: First RoR application. File not found

2010-12-15 Thread Roman Truschev
Hi,

Are you're sure that you've added _all_ necessary files to your commit and
pushed it to remote?

On Tue, Dec 7, 2010 at 1:58 AM, fikre fikrelegue...@gmail.com wrote:

 Hi

 Im trying to run my first Rails app on heroku. The app works fine
 locally, but on heroku i get the following error in the log file



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: First RoR application. File not found

2010-12-15 Thread Jeff Schmitz
I'm curious what you are removing the period from.

Is this environment.rb, or part of a require statement?

I ask because I can't recall specifying a path to *anything* in rails.

Can you show us the offending line?  You'd probably get better help.

jeff

On Mon, Dec 6, 2010 at 4:58 PM, fikre fikrelegue...@gmail.com wrote:

 Hi

 Im trying to run my first Rails app on heroku. The app works fine
 locally, but on heroku i get the following error in the log file

 == dyno-3472604.log ==
 /home/slugs/369295_906adb5_d63d-10d6387d-4b05-48a9-8cfb-819aae2e6528/
 mnt/.bundl
 /gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/
 dependencies.rb:304:
 n `depend_on': No such file to load -- ./app/Models/Notes/Note
 (LoadError)
from /home/slugs/
 369295_906adb5_d63d-10d6387d-4b05-48a9-8cfb-819aae2e65
 8/mnt/.bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/
 active_support/depende
 cies.rb:216:in `require_dependency'


 I'm new to RoR, from what i can understand the file ./app/Models/
 Notes/Note cannot be found. I tried removing the period from the
 beginning of the path but i get the same error.

 Not sure what else to try.

 --
 You received this message because you are subscribed to the Google Groups
 Heroku group.
 To post to this group, send email to her...@googlegroups.com.
 To unsubscribe from this group, send email to
 heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/heroku?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Error when using memcached uninitialized constant Memcached (NameError)

2010-12-15 Thread chris
Remove the gem 'memcached' line from your gemfile and you should be good 
to go. You only need the dalli gem.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Why is this Eventmachine process being terminated?

2010-12-15 Thread Jonas
Thanks David, it makes perfectly sense.

For people playing around with the daemons gem, this is the equivalent
of setting the :ontop option to true. (http://daemons.rubyforge.org/
classes/Daemons.html#M04)

On 15 Dec., 16:08, David Dollar ddol...@gmail.com wrote:
 Is your rake task launching a daemon in the background? With the way our 
 workers work, you should have rake jobs:work launch a foreground process, 
 and we will keep it alive.

 On Dec 15, 2010, at 7:32 AM, Jonas wrote:



  Hi guys,

  So I've been having some issues running an eventmachine worker on
  Heroku. After some tedious debugging I realized that it didn't appear
  to be what the event machine was doing that caused the problem. A
  simple eventmachine loops that does nothing but logging a tick every
  second is killed as well.

  My problem:
  The eventmachine process is being terminated within 15 seconds from
  start. A SystemExit exception is thrown.

  My setup:
  The rake task jobs:work uses the daemons gem to start a new daemon
  that runs the eventmachine reactor.

  Here is the three simple files 
  used:https://gist.github.com/061ab6973843c31dace3
  And the logged output:https://gist.github.com/b7beaeed48b8059efc4b

  What makes it this difficult to have an EM-process running?

  It's running perfectly on a local machine, of course.

  Cheers

  --
  You received this message because you are subscribed to the Google Groups 
  Heroku group.
  To post to this group, send email to her...@googlegroups.com.
  To unsubscribe from this group, send email to 
  heroku+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/heroku?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



Re: Why is this Eventmachine process being terminated?

2010-12-15 Thread Adam Wiggins
On Wed, Dec 15, 2010 at 1:46 PM, Jonas jo...@jonasbnielsen.dk wrote:
 For people playing around with the daemons gem, this is the equivalent
 of setting the :ontop option to true. (http://daemons.rubyforge.org/
 classes/Daemons.html#M04)

I suggest not using the Daemons gem at all.  Here's a hello-world
eventmachine daemon running via the DJ convention in your Rakefile:

task 'jobs:work' do
  require 'eventmachine'
  EM.run do
EM.add_periodic_timer(1) do
  puts Tick! #{Time.now}
end
  end
end

Dustin Sallings, one of the authors of memcached, put it beautifully
when he said: Self-daemonizing programs start you down the path to
hell..  See:

http://dustin.github.com/2010/02/28/running-processes.html

Adam

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.



No joy with Rails 3: no such file to load -- dispatcher (LoadError)

2010-12-15 Thread Jonathan
I've been trying to move an app from Rails 2.3.8 to 3.0.3.  The 2.3.8
version runs fine on Heroku.  Modified for Rails 3.0.3, it runs on my
Windows/MySQL development machine.

But I haven't been able to get it to run at all on Heroku.  bundle
install runs clean, and git push runs clean.  All I get from Heroku
is App crashed.

In the console log (below), Rails can't find dispatcher.  But I
don't see dispatcher or dispatcher.rb is in the file tree.  What's
missing?  If I'm missing a Gemfile entry, how can I find out what it
is?

Thanks very very much for any help at all!

$ heroku logs --app myapp

== dyno-3674715.log (crash) ==
/disk1/home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require': no such file to load -- dispatcher (LoadError)
from /disk1/home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
from /disk1/home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:227:in
`load_dependency'
from /disk1/home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/
adapter/rails.rb:43:in `load_application'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/
adapter/rails.rb:23:in `initialize'
from /home/heroku_rack/heroku.ru:29:in `new'
from /home/heroku_rack/heroku.ru:29
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `initialize'
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:63:in `new'
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/.../mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/
lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1

- Your application is requiring a file that it can't find.

   Most often this is due to missing gems, or it could be that you
failed
   to commit the file to your repo.  See http://docs.heroku.com/gems
for
   more information on managing gems.

   Examine the backtrace above this message to debug.

$ 

-- 
You received this message because you are subscribed to the Google Groups 
Heroku group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.