mwotton / Hubris

Bridge from Ruby to Haskell
shimweasel.com
262 stars 16 forks source link

Permission denied for /var/hubris directory #14

Closed Neurogami closed 14 years ago

Neurogami commented 14 years ago

When installing the gem on Ubuntu, using root gem i hubris, the Hubris code attempts to create /var/hubris, but regular users may not have permission to do this.

Code in lib/hubris.rb wants this:

SO_CACHE = File.expand_path("/var/hubris/cache")

HS_CACHE = File.expand_path("/var/hubris/source")

and then calls FileUtils.mkdir_p for each.

mwotton commented 14 years ago

yeah, fair enough. There should be a config option - push a patch and i'll merge it.

mwotton commented 14 years ago

ok, fixed in the HEAD - if there's an environment variable HUBRIS_DIR, it'll use that as its base, otherwise it'll use /var/hubris. Reckon that's enough? I can see an argument for using ~/.hubris/ (or even ~/.gems/hubris) for normal users.

kurtgodelisdead commented 14 years ago

I can see an argument for using ~/.hubris/ (or even ~/.gems/hubris) for normal users

Any idea in what version this will happen? Doesn't seem to be the case in 0.0.3

mwotton commented 14 years ago

It'll be in the next one. I'm at a haskell hackathon this weekend, should be able to get a release out.

mwotton commented 14 years ago

still haven't got a gem out - are you experiencing this when installing from github, or just with a gem/cabal install?

hamin commented 13 years ago

i can install the hubris gem for a rvm 1.9.2 installation but when i go to irb and do require 'hubris' i get this same permissions error. Ideas?

mwotton commented 13 years ago

hamin: I'd install from git for the moment. I'm holding off putting out a new gem until I've sorted out the build problems in my dependencies. Once you install from git, then you should be able to set the HUBRIS_DIR directory yourself.