Installing nanoc in a home directory (without sudo/root access)

4 views
Skip to first unread message

Schof

unread,
Dec 23, 2009, 1:20:09 AM12/23/09
to nanoc
I'm interested in running Nanoc on a host that only supports
installing software via FreeBSD ports. If it's not in the ports
collection, they won't install it. (With some exceptions not relevant
here.)

They do have Mercurial installed. And I can execute software in my
home directory.

Can I check out, say, the 3.0.2 tag of Nanoc using hg, and then run it
from my home directory without actually installing it?

Thanks very much!


Schof

Denis Defreyne

unread,
Dec 23, 2009, 4:56:24 AM12/23/09
to na...@googlegroups.com

Hi,

On UNIX-like systems, you can pretty much always install any software without root access. The standard ./configure && make && make install approach allows it (with ./configure --prefix=$HOME). With Rubygems, I believe you can invoke “gem” without sudo; this will cause the gem to be installed in ~/.gems if I’m not mistaken.

Personally, I am rather fond of rvm for managing my Ruby installations; it allows multiple Ruby versions along with rubygems to be installed without needing root access at all. This may be something worth looking into; check out http://rvm.beginrescueend.com/install/.

You can also clone the nanoc repository (either the main Mercurial one or the git mirror) and the bin/ directory in there to your $PATH, although I believe this is not the easiest approach.

Hope this helps,

Denis

--
Denis Defreyne
denis.d...@stoneship.org

Schof

unread,
Dec 23, 2009, 12:59:56 PM12/23/09
to nanoc
On Dec 23, 1:56 am, Denis Defreyne <denis.defre...@stoneship.org>
wrote:

> On UNIX-like systems, you can pretty much always install any software without root access. The standard ./configure && make && make install approach allows it (with ./configure --prefix=$HOME). With Rubygems, I believe you can invoke “gem” without sudo; this will cause the gem to be installed in ~/.gems if I’m not mistaken.
>
> Personally, I am rather fond of rvm for managing my Ruby installations; it allows multiple Ruby versions along with rubygems to be installed without needing root access at all. This may be something worth looking into; check outhttp://rvm.beginrescueend.com/install/.

>
> You can also clone the nanoc repository (either the main Mercurial one or the git mirror) and the bin/ directory in there to your $PATH, although I believe this is not the easiest approach.

Thanks very much for the quick reply, Denis!

I tried the clone option, and no luck. My results follow:

$ hg clone -r 3.0.2 http://projects.stoneship.org/hg/nanoc/
$ ls
nanoc
$ ./nanoc/bin/nanoc3
/home/private/nanoc/lib/nanoc3/cli.rb:7:in `require': no such file to
load -- cri (LoadError)
from /home/private/nanoc/lib/nanoc3/cli.rb:7
from ./nanoc/bin/nanoc3:9:in `require'
from ./nanoc/bin/nanoc3:9
$


Am I missing some obvious steps here? This seemed like the easiest
option, but no dice.

If there's a quick fix for this, please let me know. Otherwise I'll
check out rvm was you suggest.

Thanks!


John

Denis Defreyne

unread,
Dec 23, 2009, 2:01:26 PM12/23/09
to na...@googlegroups.com
On 23 Dec 2009, at 18:59, Schof wrote:

> I tried the clone option, and no luck. My results follow:
>
> $ hg clone -r 3.0.2 http://projects.stoneship.org/hg/nanoc/
> $ ls
> nanoc
> $ ./nanoc/bin/nanoc3
> /home/private/nanoc/lib/nanoc3/cli.rb:7:in `require': no such file to
> load -- cri (LoadError)
> from /home/private/nanoc/lib/nanoc3/cli.rb:7
> from ./nanoc/bin/nanoc3:9:in `require'
> from ./nanoc/bin/nanoc3:9
> $
>
>
> Am I missing some obvious steps here? This seemed like the easiest
> option, but no dice.
>
> If there's a quick fix for this, please let me know. Otherwise I'll
> check out rvm was you suggest.

Hi,

nanoc depends on cri. You’ll need to install it first: “gem install cri”. Rubygems takes care of that when installing nanoc using “gem install”. You may also need to make sure rubygems is loaded; set $RUBYOPT (in ~/.profile or so) to “rrubygems”, i.e. export RUBYOPT="rrubygems".

Schof

unread,
Dec 23, 2009, 9:07:45 PM12/23/09
to nanoc
On Dec 23, 11:01 am, Denis Defreyne <denis.defre...@stoneship.org>
wrote:

> nanoc depends on cri. You’ll need to install it first: “gem install cri”. Rubygems takes care of that when installing nanoc using “gem install”. You may also need to make sure rubygems is loaded; set $RUBYOPT (in ~/.profile or so) to “rrubygems”, i.e. export RUBYOPT="rrubygems".

Installed and running, Denis! Thanks very much!


John

Reply all
Reply to author
Forward
0 new messages