Success installing Ruby via opkg

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
prolefeed
DD-WRT Novice


Joined: 15 Jul 2014
Posts: 3

PostPosted: Fri Aug 07, 2015 21:02    Post subject: Success installing Ruby via opkg Reply with quote
This took a bit to track down so I thought I'd share.
After opkg install ruby-core (and others), proceed as follows.

##set some new env vars:
## (add these to your ~/.profile also so it works after reboot

export GEM_HOME='/opt/usr/lib/ruby/gems'
export GEM_PATH='/opt/usr/lib/ruby/gems'
export RUBYLIB='/opt/usr/lib/ruby/1.9'


##mv everything in mips-linux
cp -R /opt/usr/lib/ruby/1.9/mips-linux/* /opt/usr/lib/ruby/1.9/


## link in /usr/bin
ln -s /opt/usr/bin/ruby /usr/bin/ruby

## gem fails to work over softlink, dont know why.
cp /opt/usr/bin/gem /usr/bin/gem

Voila. Hope thats helpful.
Sponsor
prolefeed
DD-WRT Novice


Joined: 15 Jul 2014
Posts: 3

PostPosted: Fri Aug 07, 2015 22:03    Post subject: Reply with quote
...although "gem" doesn't work.

Code:
ERROR:  Error installing mechanize:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /opt/usr/lib/ruby/include/ruby.h


Gem files will remain installed in /opt/usr/lib/ruby/gems/gems/unf_ext-0.0.7.1 for inspection.
Results logged to /opt/usr/lib/ruby/gems/gems/unf_ext-0.0.7.1/ext/unf_ext/gem_make.out
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum