Cant install ruby-switch for ruby on rails - ruby-on-rails

I am trying to install ruby on rails on Ubuntu via bright box. I've installed:
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby ruby-dev
But when I try to install this:
sudo apt-get install ruby-switch
I get this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ruby-switch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ruby-switch' has no installation candidate
What is the problem, and how to solve it?

It doesn't look like ruby-switch is available anymore. That's what apt-get is informing you of.
If you're looking for a way to manage the versions of Ruby, then there is rbenv or RVM available instead. These two approaches are more standard and widely accepted as good ways to switch between Ruby version - but pick only one.

Related

how can i install rmagick on ubuntu 17.04

Installing rmagick on Ubuntu
there are solutions for different versions of ubuntu, but none worked on 17.04 ?
sudo apt-get install libmagickwand-dev gives
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: imagemagick-6-common (= 8:6.9.7.4+dfsg-3ubuntu1) but 8:6.9.7.4+dfsg-3ubuntu1.2 is to be installed
Depends: libmagickwand-6.q16-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Couldn't find any solution for this. Updated to Ubuntu to 17.10, where it works fine.
You can search for any packages in ubuntu doing a sudo apt-cache search libmagickwand-dev and if you find the package you are looking for then install it doing sudo apt-get install libmagickwand-dev,
Installing all the unmet dependencies should fix the problem, and it is always helpful to do the commands below to upgrade any missing packages
sudo apt-get upgrade && sudo apt-get update
You should be able to install rmagick without any issues after this.

Problems installing scikit-image in ubuntu 14.04

When I try to install scikit-image with pip2 there is show error. I have tried to find this problem solution.
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/scikit-image
Storing debug log for failure in /home/nshakib/.pip/pip.log
My guess is that you might have missing dependencies. I don't think Ubuntu 14.04 comes out of the box with any of the SciPy stack.
To answer your question try,
sudo apt-get install python-matplotlib python-numpy python-pil python-scipy
Then
sudo apt-get install build-essential cython
Finally
sudo apt-get install python-skimage
If that still doesn't work, you could try using the Anaconda Distribution for Python 2.7 from Continuum Analytics.
It comes with many of the major packages built-in and has a great package manager that manages dependencies.
https://docs.continuum.io/anaconda/install#anaconda-install
The conda package would be installed with conda install scikit-image

ruby install rvm not working

I want to install rvm and geting problem. Here is my command which i run in ubnto 2.10 How can i do this?
root#jaskaran-Vostro-1550:/home/jaskaran# rvm install 2.1.0
The program 'rvm' is currently not installed. You can install it by typing:
apt-get install ruby-rvm
root#jaskaran-Vostro-1550:/home/jaskaran# apt-get install ruby-rvm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby-rvm
Use this instead to install RVM:
curl -sSL https://get.rvm.io | bash
You can refer to official RVM Installation Page.
Once RVM is successfully installed, make it available in the current shell:
source /etc/profile.d/rvm.sh
Then you can install the Ruby version you want:
rvm install 2.1.0 to install Ruby version 2.1.0.
You probably want to clean up your environment first just like this post tells you to: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
You can also do this:
sudo apt-get install rvm
next you will have to source the
source /home/username/.rvm/scripts/rvm
after then you can go ahead and install by running
rvm install version
Hope this help another person.

Installing Ruby on Rails on Linux mint?

When I used "sudo apt-get install ruby-full build-essential" in the terminal I got this:
$ sudo apt-get install ruby-full build-essential
Reading package lists... Error!
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/packages.medibuntu.org_dists_quantal_non-free_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
Can anybody tell me how can I install Ruby on Rails in my Linux Mint machine?
I think you don't need features of rvm. You just want to install ruby easy, fast and without troubles, right? Good news to you. We got an alternative to rvm. It's called rbenv. You can find an installation guide here.(don't skip ruby-build, it is necessary!).
And yes, follow ubuntu instructions since Mint is build on it (though there's debian-based version but I suppose you use ubuntu-based one).
I installed yesterday Mint 16 and rbenv on it. Works fine.
PS: don't forget to sudo apt-get install build-essential first.
I actually use Mint on my main development system. I'd also recommend using RVM to manage all your Ruby and Rails installation/versions. The command to install it is:
\curl -L https://get.rvm.io | bash -s stable
You can also append --ruby and --rails to get (I believe) the most recent versions of the two of them. I'd recommend not using apt-get for installing Ruby, as I've noticed that it can be out of date and/or lead to strange errors like those that you're seeing. You can get more information from the RVM website. I really enjoy using Mint, so I hope that helps.
Use rvm to install Ruby then simply install rails gem , but before that fix your repository related problem.
sudo rm -rf /var/log/apt/list
sudo apt-get update
sudo apt-get upgrade
Then install rvm see rvm.io for installation info
If you are new want to setup everything from start then see this blog post
https://www.computersnyou.com/4235
Use rbenv
instead, use this link DigitalOcean since mint is an ubuntu based distro, it will work.

cant install rails in ubuntu 9.10 in my eee pc

i am trying to install rails in my eee pc with the last version of ubuntu and i have some package that are told installable.how is it possible?i can even install gem
fenec#fenec-laptop:~$ gem
The program 'gem' can be found in the following packages:
* rubygems1.8
* rubygems1.9.1
Try: sudo apt-get install <selected package>
gem: command not found
root#fenec-laptop:/home/fenec# apt-get install rubygems1.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package rubygems1.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package rubygems1.8 has no installation candidate
Is it possible that some package are not installable due to my hardware? I have this problem only with this version of ubuntu i used to have ubuntu 8.10 and rails was working like a charm.
I usually install ruby gems from source. I would try following this guide - it's worked for me on multiple different Ubuntu installs.
See: https://help.ubuntu.com/community/RubyOnRails

Resources