Posted by Dhaval Parikh on Jan 1, 2013
Hi all
If you get stuck with this strange error of uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) don’t worry.
Just follow the steps below :-
gem update –system 1.5.3
once its installed successfully do gem list and see if you have any other versions of rubygems-update already installed. If so remove all the others apart from 1.5.3
Once you do that run the following command
update_rubygems
The above command will show that 1.5.3 is installed. Do confirm the same by checking the gem version gem -v
Hope this helps. In case you have any query related to this do post a comment and I will get back ASAP
Njoi
Tags: mutex error, mutex rails 2.3.8, rubygems error
Posted by Dhaval Parikh on Dec 20, 2012
Hi all
As such Ubuntu 8.10 is no longer used but incase you need to use it and you are facing issues with updating the same the problem lies in sources.list file which resides under /etc/apt/sources.list
Keep a backup of the old file and than replace the content of the old one to the one below.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid universe
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid universe
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ intrepid multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-updates multiverse
## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://old-releases.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
# deb-src http://old-releases.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu intrepid partner
# deb-src http://archive.canonical.com/ubuntu intrepid partner
#deb http://security.ubuntu.com/ubuntu intrepid-security main restricted
#deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted
#deb http://security.ubuntu.com/ubuntu intrepid-security universe
#deb-src http://security.ubuntu.com/ubuntu intrepid-security universe
#deb http://security.ubuntu.com/ubuntu intrepid-security multiverse
#deb-src http://security.ubuntu.com/ubuntu intrepid-security multive
Now try apt-get update and it should work. Let me know if you still face issues.
Njoi
Tags: old-release ubuntu 8.10, ubuntu 8.10, ubuntu source.list issue
Posted by Dhaval Parikh on Aug 4, 2012
Hey all
Now most of us are working on rails 3.2.X I thought of posting about how to configure the same along with mysql server 5.1 on a Ubuntu server.
As always the first step will be to install essentials utilities.
Prerequisites
apt-get update
apt-get install aptitude
aptitude install build-essential
Now some prerequisities for ruby
sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev
Now we will move to step #2
Install Ruby 1.9.2 from source
so first download the source using
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.zip
than install unzip using
apt-get install unzip
unzip ruby-1.9.2-p290.zip
cd ruby-1.9.2-p290
./configure –prefix=/usr/local
sudo make && sudo make install
Now check if ruby got installed properly or not using ruby -v command it should show you ruby 1.9.2p290
Install mysql 5.1
sudo apt-get install mysql-server-5.1
Install Rails and essential gems
sudo gem install mysql2 rails rack rake mysql
Doing this if you get an error about UTF-8 just run the following command
export LC_ALL=”en_US.UTF-8″
I guess thats all now create your rails app using
rails new new_rails_app -d mysql
Later if you want to configure it using Apache visit my previous post on
http://blog.dhavalparikh.co.in/2012/06/deploying-rails-app-using-apache-and-passenger-on-ubuntu/
Let me know if you face any issues in any of the steps above and I shall be happy to guide you.
Tags: install ruby 1.9.2, rails 3.2, ruby + rails + mysql
Posted by Dhaval Parikh on Jun 25, 2012
Hey all
If you want to use apache to deploy your rails app than passenger has made your task really easy.
I assume that you have already installed apache if not do it using
sudo apt-get install apache2
Now follow these steps below and get going.
First step it to install passenger gem using
sudo gem install passenger
Once done the next step is to install the apache2 module for passenger using
sudo passenger-install-apache2-module.
I will prompt you with an option. Select #1
When you do this it will start compiling the files and will prompt for errors if any. Like when I did it for the first time I was asked to installed a couple of missing lib files required to configure along passenger. Example
apt-get install lib-curl4-openssl-dev
apt-get install apache2-prefork-dev
apt-get install libapr1-dev
apt-get install libaprutil1-dev
If every thing is installed file it will ask you to add few lines to your httpd.conf file.
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.13
PassengerRuby /usr/bin/ruby1.8
Once thats done. You will again need to add few more likes to your httpd.conf file which is actually setting up DocumentRoot for you app. will looks something like
ServerName www.yourhost.com
# !!! Be sure to point DocumentRoot to ‘public’!
DocumentRoot /somewhere/public
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
Make sure you replace the DocumentRoot with a valid path.
So the final conf file will look like this
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13
PassengerRuby /usr/local/bin/ruby
ServerName www.domain.com
# !!! Be sure to point DocumentRoot to ‘public’!
DocumentRoot /var/www/app/public
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
Once done close your file and restart apache using
/etc/init.d/apache2 restart
go you your url and check if it works. If not let me know I shall guide you but I think there should not be any issues.
Isn’t that really simple? Yes it is. Njoy Rails.
Posted by Dhaval Parikh on May 31, 2012
Hi all
If you face this weird problem where your Ubuntu machine starts in terminal mode with no xstart option. try the following commands.
Try to first scan your system using fsck if that doesn’t work or it get stuck after few % try the next step.
type Xstart on the command prompt and press enter. still no success?
try apt-get update and if you see that your file system is read-only. Try the commands below
First of all shutdown your system using
shutdown -r now -F
once restarted try to remount your root partition using the following command
mount -o remount,rw /
If none of the above method works. Insert a Live Ubuntu CD. use GUI tool to scan your system by opening disk utility from the following path.
System > Administration > Disk Utility
Hope this solves your problem. If it doesn’t do post a comment and I shall try to help you out.
Njoi
Tags: read only file system, ubuntu read-only, ubuntu xstart
Posted by Dhaval Parikh on Oct 3, 2011
Hi all
Was updating one server with rails 2.2.2 to rails 2.3.8. I upgraded ruby from 1.8.6 to 1.8.7 and also rubygems to 1.3.4 version from a source. When i did ruby script/server to start the server I got this error no such file to load — openssl
After a 15 mins R&D i found that this usually happens on an Ubuntu machine (which it was in my case). The solution is as follows
First install libssl using
sudo apt-get install libssl-dev
Than go to the source of ruby and go to the following path
cd ext/openssl
Run the command one after the others.
ruby extconf.rb
make
sudo make install
Now try to do ruby script/server again……and boooooooom! solved.. Even after trying this you are stuck let me know I shall help you out.
Thanks
Tags: open ssl error, openssl + ruby, openssl + ubuntu, openssl error