Configuration issue #4

Closed
grillermo opened this Issue Jun 12, 2012 · 5 comments

Comments

Projects
None yet
3 participants

Hi, i'm getting this error
I followed the steps exactly as they are in the docs but in heroku logs i keep getting this error

Unexpected error while processing request: uninitialized constant Rack::Builder::FistFace

When i got to myherokuapp.herokuapp.com/myfont.css

I successfully pushed the changes and i can see the dir content

config.ru  Gemfile.lock  Inconsolata.css  Gemfile    Inconsolata   

Both in local and in heroku doing heroku run bash
I think its a gem issue, the contents of my Gemfile

    source "http://rubygems.org"
    gem "sinatra",  "~> 1.1"
    gem "fistface", "~> 1.0"

And my config.ru

    require 'rubygems'
    require 'bundler'
    Bundler.require
    run FistFace

And i'm sure my bucket url is fine as i use it lin other apps
heroku config:add S3_URL=https://s3.amazonaws.com/mybucket

Is there any assumed steps that i'm missing?

Owner

croaky commented Jun 12, 2012

Try the newer version?

gem 'fistface', '1.0.1'

You shouldn't need to add Sinatra to your Gemfile since it's a dependency of Fist Face.

Everything there looks correct to me, though. Have you also tried requiring Fist Face in the config.ru?

require 'rubygems'
require 'bundler'
Bundler.require
require 'fistface'
run FistFace

I re did all the steps but modifying the Gemfile and the config.ru as you suggested.
But no luck, i know its stalling fistface because when i push i get
Installing rack (1.4.1)
Installing rack-protection (1.2.0)
Installing tilt (1.3.3)
Installing sinatra (1.3.2)
Installing fistface (1.0.1)
Using bundler (1.0.7)

But the same error appears in heroku logs
Unexpected error while processing request: uninitialized constant Rack::Builder::FistFace
I'm sorry to bother but i don't have experience with ruby/sinatra apps.

just3ws commented Jul 11, 2012

I had a similar error, I changed the config.ru to fully-qualify the FistFace namespace.

require 'rubygems'
require 'bundler'
Bundler.require
require 'fistface'
run Sinatra::FistFace

I've not uploaded any fonts yet but I can now start the server without it crashing on either Heroku or locally. Tomorrow I'll try out with some fonts.

@croaky thanks for this awesome project, was about to try to hack together this basic thing to support an app I'm working on as well, but found FistFace and saved a LOT of time. Much appreciated and much respect to the ThoughtBot.

just3ws commented Jul 11, 2012

Okay, I played around with getting it to run this afternoon. A few things to be aware of.

I'm betting that @croaky wrote this back before the great "Cedar Switcheroo" at Heroku. If you're like me and trying to get this running since they changed the default stack you'll likely have problems as well.

Another thing is that you need to call "run Sinatra::Application" at the end of your config.ru. I'm not experienced with writing module Sinatra apps so I just had to goog it and found other people with the same problem. It appears to be a Sinatra issue.

So, what needs to be done? Not a lot actually...

  1. Create your app on the Heroku bamboo-mri-1.9.2 stack

    heroku create your-app-name-here --stack bamboo-mri-1.9.2

  2. Set your config.ru up like...

encoding: utf-8

require 'rubygems'
require 'bundler'
Bundler.require
require 'fistface'

run Sinatra::FistFace
run Sinatra::Application

Everything else in the original instructions worked. It's probably better to run on bamboo anyway as Cedar removed the caching layer and all requests go directly to the app server.

@croaky croaky added a commit that referenced this issue Aug 3, 2012

@croaky croaky [#4] Fix instructions in README 6b7b1cd
Owner

croaky commented Aug 3, 2012

Thanks, @just3ws. I just tested it out myself, saw the same result. Updated the README with improved instructions.

Cheers!

croaky closed this Aug 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment