Archive for the ‘Ruby’ Category
MySQL Gem on Leopard
If you’re running the Leopard Mac OS, you’ll need the following command to properly install the MySQL gem:
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ --with-mysql-config=/usr/local/mysql/bin/mysql_config
This page also has some good information that tries to answer questions regarding Ruby and OS X.
Updating Ruby Gems in Leopard
This may be old news but I think little tidbits like this are important to document. If you’re running Ruby on Leopard (Mac OS) and you’re running into issues with your gems, try the following:
For intel-based macs:
sudo su
[Enter your password]
bash
export ARCHFLAGS=”-arch i386″
gem update
For ppc macs:
sudo su
[Enter your password]
bash
export ARCHFLAGS=”-arch ppc”
gem update
How to Install Ruby on Rails 2.0
If you want to start playing with the latest features of Ruby on Rails (2.0 due out very soon), you can install from source with something like the following:
sudo gem install rails --source http://gems.rubyonrails.org -y
To verify your install,
rails --version
Uninstalling nginx via apt-get: Stopping nginx: invoke-rc.d: initscript nginx, action “stop” failed.
If you get something like the following error:
-
Removing nginx ...
-
Stopping nginx: nginx.
-
Stopping nginx: invoke-rc.d: initscript nginx, action "stop" failed.
-
dpkg: error processing nginx (--remove):
-
subprocess pre-removal script returned error exit status 1
-
Starting nginx: /usr/sbin/nginx: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
-
invoke-rc.d: initscript nginx, action "start" failed.
-
dpkg: error while cleaning up:
-
subprocess post-installation script returned error exit status 127
-
Errors were encountered while processing:
-
nginx
-
E: Sub-process /usr/bin/dpkg returned an error code (1)
when you try to execute something like this:
-
sudo apt-get remove nginx -yf
Then you need to add
exit 0
to the second line of your
/etc/init.d/nginx
file. Pure hackery but it works.
Installing Mongrel on Ubuntu ERROR: While executing gem … (OpenURI::HTTPError)
If you get the following error:
ERROR: While executing gem ... (OpenURI::HTTPError)
404 Not Found
when running the following:
sudo gem install mongrel
Then run it again. Sometimes it takes running the command several times for it to take.