New location for the mysql socket in Karmic Koala

Just loaded up my development environment for one of my rails application, which I haven't used since I upgraded to Ubuntu 9.10 (Karmic Koala) to find that my application wouldn't run. Turns out that the mysql socket is now in /var/run/mysqld/mysqld.sock. Note: its not mysql.sock but mysqld.sock now. Anyways back to work...

more...

Deploying to Staging and Production Environments via Capistrano

Ok, so I admit it. Im late to the game as far as using capistrano for deployment of my rails applications.
But I figured, today is a nice rainy day and a great opportunity to give this a shot. Below is the play by play for getting capistrano set up to work.
Im going to make some initial assumptions. First, you are using subversion.
Second, you want to be able to deploy to different environments, (in my case Staging and Production).
Third, you are using a shared hosting environment, using Phusion Passenger
Fourth, you are running your deployment for a linux machine. What follows below assumes Ubuntu in particular.
Fifth, and finally, you like reading verbose posts about technology on random blogs that you come across 'dem internet tubes.
So follow me inside, for more on deploying your ruby on rails application with Capistrano

Read more

more...

Displaying Japanese in Adobe Reader 9.1.2 on Linux

Wanted to do a quick follow up post for those users who need asian languages to be displayed in Adobe Reader 9.1.2 for linux. The application will tell you to go to the Adobe Reader - Asian and Extended Language Font Packs page but you notice that at least at the time of this post that there is no option for Adobe Reader 9 in the adobe reader drop-down list and if you try to install from the Adobe Reader 8 files it won't work. Here is a link to the only site that I have found that has the asian font packs for 9.1.2.

more...

Installing Adobe Reader 9.1.2 (acroread) on Ubuntu 9.0.4

Where there are some free alternatives for viewing pdfs on linux they just don't look right when there is Japanese in the pdf. So I decided to install Adobe Reader for linux. In the past this might have been a task that would be slightly less painful than say pulling out my fingernails with a pair of pliers These days it is pretty painless. Below is the steps to get Adobe Reader installed on Ubuntu.

Step 1 - Download Adobe Reader from the Adobe website.

Get Adobe Reader

Step 2 - Run The Binary you just downloaded

For my machine the binary file is AdbeRdr9.1.2-1_i486linux_enu.bin but it may be different for you depending on your machine. This is the command to run the binary. Note that I am in the same directory that I downloaded the file into.

sudo ./AdbeRdr9.1.2-1_i486linux_enu.bin

You will be prompted to choose an installation directory (or just hit return if your fine with the default) and then you will see the output listed below.

Extracting files, please wait. (This may take a while depending on the configuration of your machine)

This installation requires 145 MB of free disk space.

Enter installation directory for Adobe Reader 9.1.2 [/opt]  
/opt

Installing platform independent files ... Done
Installing platform dependent files ... Done
Setting up libraries ... Done
Setting up desktop and menu icons ... Done
Setting up the browser plugin ... Done

Once its done you should now have a working version of Adobe Reader on your linux box.

To run Adobe Reader simply type "acroread" from the command line and Adobe Reader will launch. You can also launch it from the Applications -> Office Menu. The first time you run it you will be presented with Adobe's EULA, after accepting it, you are free to run Adobe Reader.

more...

Using Django to Serve Static Files in Development

So by default Django doesnt serve static files because, well, it doesn't serve them as well as a web server like Apache would. But one small thing struck me as odd in the online documentation that describes how to serve static files in the snippet below

 

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}),
    )

Why wouldn't you use the MEDIA_ROOT variable from settings.py? Granted this may not be the biggest issue, but if given the choice, I think my preference would be to keep the settings for the application in settings.py, you know the file for application settings. Yes I know this shouldn't be used outside of development, but still wonder what the advantage of doing it this way would be...

Below is the code I am currently using,

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )
more...
1 2 »