After a new install of RVM on Ubuntu, you may run into the error “There was an error(23)” in conjunction with a file write or folder creation permission error. This is caused when, for some reason, RVM does not properly add your Ubuntu user to the RVM group after it was installed. To correct this error, you need to complete the following steps, and executing the following commands:
Execute in terminal:
rvm group add rvm "$USER"
Log out of Ubuntu and log back in. If it still fails, you may need to have RVM fix its system permissions with the command:
Execute in terminal:
If you are trying to use new plugins for Gedit, the default text editor on Mint, you might run into a problem as a lot of the new plugins require Gedit >=3.0 and be default Mint comes with 2.30.
To fix this you need to first get rid of Gedit 2.30 completely by running the following commands in your terminal.
sudo apt-get purge gedit
sudo apt-get purge gedit-common
Once those commands have completed successfully you need to run these commands to get the 3.6.1 version.
sudo apt-get install gedit-common/quantal
sudo apt-get install gedit/quantal
Now that we have the correct Gedit version we can install the Ruby and Rails plugins for Gedit. That’s all there is to it!
$ sudo apt-add-repository ppa:ubuntu-on-rails/ppa
$ sudo apt-get update
$ sudo apt-get install gedit-gmate
$ sudo apt-get install gedit-plugins
After you have installed PostgreSQL 9.1 on your Linux Mint 12/13/14, created a user login, a database with that user as the owner and try to connect to that database using that user, you may run into the following error:
Password for user someuser:
psql: FATAL: Peer authentication failed for user “someuser”
If this is the case, you need to open up this file /etc/postgresql/9.1/main/pg_hba.conf in a text editor (with root privileges) and change this line:
local all all peer
local all all md5
After changing and saving the file, restart the PostgreSQL server:
sudo service postgresql restart
You should not have no issue connecting to your databases using the associated user.
How to install Oracle JDK 7 instead of the OpenJDK on your Linux Mint 13 (or Ubuntu 12) system. I found that I needed the official JDK in order to properly run JetBrains’ RubyMine IDE as well as a few other applications which do not play well with OpenJDK.
To do this open a terminal and execute the following commands in order:
After the installation runs its course, check to make sure that Java is reporting the correct version of JDK 7. Execute the command:
It should return something like this:
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
If the version reported back is not the latest as installed by the above command you may need to force the system to update its references to Java and its executables. Run the following command and then check the version again to verify:
update-java-alternatives -s java-7-oracle
When setting up a Ruby/Rails development environment utilizing Ubuntu 12.04 LTS you may find yourself running into issues with setting your RVM default Gemset.
I attempted to set the default Gemset using every possible combination of the command rvm –default use 1.9.3-p286@corerivalry but every time I closed my terminal and re-opened it my default Ruby was set, but my Gemset was continually being set back to (default).
After much searching and frustration I ran into the –rvmrc command which creates a file (.rvmrc) that specifies the Ruby version as well as the Gemset to use for an individual project. After running the command, each time I opened my terminal in my Rail application’s root folder my Ruby and Gemset are exactly what I intend them to be.
rvm use 1.9.3-p286@rails3 --rvmrc