NoMethodError: undefined method `dirname' for "app/assets/stylesheets/desktop.scss":String

(Steve Wills) #1

I’m trying to setup an install of discourse in a FreeBSD jail and I’m getting the error

NoMethodError: undefined methoddirname’ for “app/assets/stylesheets/desktop.scss”:String`

just as in this thread:

Which doesn’t give a hint what caused it or how it was resolved. I’m using discourse 1.0.3 from the gitlab release. Any suggestions would be appreciated. Thanks!

P.S. My ultimate goal is to create a port for discourse, so installation is as simple as pkg install discourse then configuration.

(Kane York) #2

Perhaps you have the wrong Ruby versions? Note that the Docker images contain a custom-built version of Ruby, as well as jemalloc for performance and a few other things:

(Steve Wills) #3

Is 2.1 required? I was following the Ubuntu doc which implies 2.0 is fine. (jemalloc is the default malloc on FreeBSD, so I don’t think that is an issue.)

(Kane York) #4

I was just taking a guess, because it sounded like an API change to me at first. Actually, it seems like that file doesn’t even call dirname:

(Steve Wills) #5

Sure, no worries.

Does having the whole error help:

(Kane York) #6

Hm, it looks like your gem versions are higher than what’s in the master branch.

For instance, you’re using sprockets-rails-2.1.4 while the Gemfile.lock has sprockets-rails (2.0.1), and sass-3.2.19 instead of sass (3.2.16).

Maybe the new sprockets-rails version is causing a problem?

(Steve Wills) #7

Thanks for the suggestion. It seems that downgrading sprockets-rails to 2.0.1 did it.

(Sam Saffron) #8

Hacking up Gemfile or Gemfile.lock is 100% unsupported

Gemfile.lock vs Gemfile
(Sam Saffron) #9