9 Sep 2010, 5:58pm
ruby:
by

leave a comment

Running Gem Server to View Docs for Ruby Libraries on Localhost

gem server

will boot up documentation on port 8808 by default pass it the -p flag followed by the port number to change.

gem server -p3000

Manage Sinatra Server in Development Mode with Shotgun

Sinatra won’t reload your files. So if you’re developing your app and want to see any changes made in the browser, install the shotgun gem.

gem install shotgun

You can then use shotgun to run your server

shotgun your_sinatra_ditty.rb

Presto, your ditty will never be out of key :)

Dot htaccess file for wordpress installation (.htaccess)

Login to your wordpress installation and scroll to and click the second to last link set “Settings”. You’ll need to configure wordpress to handle your new links as “permalinks”. Make a selection and copy the code into your .htaccess file. WordPress will attempt to do this for you, but only if your webserver can read/write to the directory.

Permalink Settings

Permalink Settings

Permalink Settings

Permalink Settings

Add the .htaccess file to the root directory of your wordpress installation if wordpress informs you that it can’t get it to work. The file should be named “.htaccess” (w/out quotes).  This is a ‘hidden’ file so if you don’t see it, run the ls -lha command which will list all the files in the directory including hidden files.

Next you’ll want to edit your VirtualHost file. I used the default VirtualHost under /etc/apache2/sites-available/default You’ll need to make one modification to this file. You need to tell it to allow overrides, since we’ll be giving the .htaccess file the right to change configuration options. We need to change the line that says AllowOverrides None to AllowOverrides All

AllowOverrides All

AllowOverrides All