Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to install bro pages: mime-types requires Ruby version >= 1.9.2

I've been trying to install bro pages, but I'm hitting a wall.

I've managed to upgrade to Ruby 2.1.0:

craig@Craig-loaf:~$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
craig@Craig-loaf:~$ gem -v
2.2.1

But I try to install bro pages, like so:

craig@Craig-loaf:~$ sudo gem install bropages
ERROR:  Error installing bropages:
    mime-types requires Ruby version >= 1.9.2.

Which to me makes no sense.

I found some where on Stackoverflow a similar problem, where another gem had issues with being installed at they recommended adding --pre --no-ri --no-rdoc to the end, but I get this error instead:

craig@Craig-loaf:~$ sudo gem install bropages --pre --no-ri --no-rdoc
[sudo] password for craig: 
ERROR:  Could not find a valid gem 'bropages' (>= 0) in any repository
ERROR:  Possible alternatives: bropages
craig@Craig-loaf:~$ sudo gem install mime-types --pre --no-ri --no-rdoc
ERROR:  Could not find a valid gem 'mime-types' (>= 0) in any repository
ERROR:  Possible alternatives: mime-types

So how can I get round this, and install bropages?

like image 878
AncientSwordRage Avatar asked Jan 25 '14 19:01

AncientSwordRage


2 Answers

Is the sudo user set up to use a different ruby version (or any ruby version at all)? I've seen this happen before on UNIX machines where the main user is configured but the sudo user isn't. For example, the way I have things set up right now, > gem install {something} works fine, but > sudo gem install {something} claims it can't find the 'gem' command.

You might also try running without sudo. I don't sudo on my Linux machine, and I'm pretty sure my Mac doesn't require me to, either.

Try running 'sudo ruby -v' and 'sudo gem -v'. If that doesn't give you what you need to solve the issue, post the output to those commands here on the thread.

like image 117
josiah Avatar answered Nov 15 '22 06:11

josiah


I got the above mentioned errors as well

I'm using Ubuntu 12.10 64bit.

bropages requires Ruby version 1.9.2, I had 1.8.7 installed. What fixed it for me is to install the latest version of ruby and install bropages gem in that so I could use it.

Here are the steps I took to install the latest version, and specify that as the one to use and to install bropages in that.

sudo apt-get update

sudo apt-get install curl

curl -L https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

rvm requirements

rvm install ruby

rvm use ruby --default

rvm rubygems current

gem install rails

gem install bropages

Then finally I can use is like this:

bro curl
9 entries for curl -- submit your own example with "bro add curl"

# get the contents of a web page
curl http://bropages.org

        bro thanks      to upvote (22)
        bro ...no       to downvote (2)

Source: https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

And http://bropages.org/

like image 35
Eric Leschinski Avatar answered Nov 15 '22 06:11

Eric Leschinski