felix clack

  • Archive
  • RSS
  • Ask me anything

Passenger Error: The application spawner server exited unexpectedly: Unexpected end-of-file detected

I got this error this morning after I thought it’d be a good idea to migrate my new Rails 3 app to Ruby 1.9.2.

Kind of a weird error because it doesn’t seem that helpful on the surface.

Digging into the Apache error logs revealed this error mesage:

[BUG] cross-thread violation on rb_gc()
(null) 

Ok, now we’re getting somewhere. This is an error due to gems being compiled in a different version of Ruby. Ah, now it makes sense. I was using bundler with the path set to /my/app/gems and they were all compiled against REE 1.8.7.

rm -rf gems
bundle install --path gems

Fixed that problem. I then ran into another error message:

git://github.com/binarylogic/authlogic.git not checked out

I’m running the edge version of Authlogic and for some reason Passenger was having a hard time with it. Right, could be to do with me running preview 4 of Passenger 3. A quick

gem install passenger

and an update to httpd.conf later and my app was back.

    • #rails
    • #passenger
    • #ruby
    • #server
    • #os x
  • 1 year ago
  • Permalink
  • Share
    Tweet

Scraping your own API

Ever wished that MySpace had an API for adding gigs to your band’s profile? If you view source on the add an event page on MySpace you might notice the url is prefixed with /API. Hmm, is this a sign of an impending release? Hopefully.

In the meantime you’ll need to roll your own.

You could use any of the current crop of libraries for http wizardry, RestClient or HTTParty maybe, but we’ve opted for Mechanize, which gives us the flexibility to interact with page elements as well as do the usual request/response stuff to urls.

There’s nothing fancy about MySpace’s forms, just post a bunch of params to the url and you’re golden. They’re even using JSON in the response.

The toughest part is that there’s no documentation as to what is required for the request to work, it’s pretty straightforward to view source and see what’s getting submitted though, so I’m sure you’ll be alright.

    • #ruby
    • #rails
    • #api
    • #scraping
    • #myspace
  • 1 year ago
  • 1
  • Permalink
  • Share
    Tweet

About

London based developer specialising in all things Ruby.

Felix on Github

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr