I just got a Raspberry Pi 3 (I already have a fair amount of UNIX experience) and installed Raspbian. I'm trying to install Rails 3 with apt-get. When I try, I get a message about unmet dependencies. I ran sudo apt-get update and sudo apt-get dist-upgrade before sudo apt-get install rails3. Is rails3 compatible with Raspbian?

pi@raspberrypi:~ $ sudo apt-get install rails3
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:
 rails3 : Depends: ruby-rails-3.2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Previous software installed:

i2c drivers

sudo apt-get install python-smbus
sudo apt-get install i2c-tools

Adafruit PCA9685 Python library

sudo apt-get install git build-essential python-dev
git clone https://github.com/adafruit/Adafruit_Python_PCA9685.git
cd Adafruit_Python_PCA9685
sudo python setup.py install

Tested with clean system

I made a fresh Raspbian SD card and only ran sudo apt-get update and sudo apt-get dist-upgrade before trying sudo apt-get install rails3. I still get the same error.

  • Have you installed software from a non-standard repository or tried to mix software between the jessie and wheezy releases?
    – joan
    Jul 30, 2016 at 8:53
  • I edited my question to add everything I installed.
    – SSteve
    Jul 30, 2016 at 14:16
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – goldilocks
    Jan 15, 2020 at 15:42

1 Answer 1


I don't know if rails 3 works, but...

from http://elinux.org/RPi_Ruby_on_Rails :

Install prerequisites

sudo apt-get install -y git curl zlib1g-dev subversion

Update APT package index

sudo apt-get update

Additional Ruby dependencies

sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev
sudo apt-get install -y libyaml-dev libsqlite3-dev sqlite3
sudo apt-get install -y libxml2-dev libxslt-dev
sudo apt-get install -y autoconf automake libtool bison

Note: Not installing openssl before RVM will cause you grief later!

Now we can use RVM straight from github using:

curl -L get.rvm.io | bash -s stable --rails

Note: With my default Debian image and keyboard map, it was very hard to get a | (pipe) character. I got it by pressing AltGr+|

When run, you will get some messages about requirements for Ruby. You need to press 'q'. Note the computer may not react straight away as it is 'thinking'. After a few seconds, the script will download and compile ruby 1.9 and Rails. This takes a long time! (3 Hrs) Have a sleep and check in the morning.

At the end of the installation, RVM suggests that you have to run a script in order to enable Ruby. (I think I only had to do this once?)

source ~/.rvm/scripts/rvm

Now you should have ruby:

pi@raspberrypi:~$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [armv61-linux-eabi]

And you should have a rails command:

pi@raspberrypi:~$ rails -v
Rails 3.2.3
  • I'd rather use the rails3 apt-get package since it exists.
    – SSteve
    Jul 30, 2016 at 23:21
  • And i'd rather be sitting on a golden toilet rather than porcelain, but sometimes it's just not in the cards. I understand your plight. Let me know if you get it to work that way. I haven't been able to. Aug 1, 2016 at 0:56
  • After further research I think I'll use web.py instead. It installed and was working in less than a minute. So the rails3 golden toilet will have to remain an unfulfilled wish.
    – SSteve
    Aug 1, 2016 at 5:41
  • indeed... maybe someday... Aug 1, 2016 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.