shared items

Wednesday, October 21, 2009

reverse_proxy

Install via Subversion using the Ruby script/plugin install command. In the root of your Rails application structure
(where you can see the app/ vendor/ and public/ folders)
execute the following command:

ruby script/plugin install http://svn.napcsweb.com/public/reverse_proxy_fix

You will be prompted by the script to specify the version of Rails you're using. Select
the version that best matches your version of Rails and press the Enter key.
You should be prompted to enter the base url of your front-end server when you install
the plugin via script/plugin install. You should not include the trailing slash! For
example:

http://www.mydomain.com/typo

If that doesn't work for some reason, you can run the install.rb script in

vendor/plugins/reverse_proxy_fix

Or you can manually edit the file lib/config.rb and uncomment the BASE_URL line. (It should be the only line in the file. Enter the desired base url
that you would like the plugin to prepend to any generated URLs.


Source : http://www.napcsweb.com/rdoc/reverse_proxy_fix/index.html

Sunday, October 18, 2009

View Your Google Calendar in Outlook 2007

Google Calendar is a phenomenal web application for managing your calendars, but so many of us are still forced to use Outlook at work. The good thing is you can have the best of both worlds by subscribing to your Google Calendar from Outlook.

The first thing you’ll have to do is get your Google Calendar iCal link. Just open your Google Calendar and go to Settings \ Calendar.

Pick the calendar you want to sync with Outlook. Now in the Private Address field click on the ICAL button. This will show you your private Calendar address. Copy this address to the clipboard.

Thursday, October 8, 2009

Installing Ruby 1.8.7 (and other stuff) manually

1. Download the windows binaries for Ruby 1.8.7 here: http://www.ruby-lang.org/en/downloads/ extract that to wherever you would like, I use c:\ruby. Then put c:\ruby\bin in your PATH environment variable.
2. Download the zlib package: http://www.zlib.net/zlib123-dll.zip and extract the zlib1.dll, rename it to zlib.dll and move it into your Windows\System32.
3. Download the iconv package: http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458. Find and extract the iconv.dll into your Windows\System32.
4. Download the rubygems package and follow the instructions, basically extracting the package and running ruby setup.rb
5. Verify that everything works properly by trying a gem install rails, once that installs then do: rails test_project



http://stackoverflow.com/questions/390897/installing-ruby-1-8-7-and-other-stuff-manually

Ruby 1.8 missing lib ( SSLEAY.dll , ZLIB.dll)

Update: There is a new effort to create a decent Windows Ruby installer. You can get the new downloadable installers from http://rubyinstaller.org/downloads/ though as of August 2009 these are still in preview form. It seems from my brief experiment that you'll still have to set your PATH manually, as per my manual instructions below. This installer also promises a faster Ruby as it builds using superior tools, so might well be worthwhile if only for that. Below are my original manual instructions for installing Ruby on Windows, which should still be just as valid as they always were. The installer is probably worth a look though.

The following worked for me on Windows XP, but maybe I'm yet to run into problems I don't know I've got:

* Download the Windows binary release from http://www.ruby-lang.org/en/downloads/
* Unzip it, in my case to C:\ruby191\
* Also download readline.dll (e.g. from http://www.econsultant.com/dll-database-r/readline.dll-download.html) and put the DLL in C:\ruby191\bin
* Put C:\ruby191\bin and C:\ruby191\lib on your PATH

That got ruby working in a basic sense for me, but I wasn't able to install gems. If I tried, I got two errors in sequence: "The ordinal 277 could not be located in the dynamic link library SSLEAY32.dll" and "This application has failed to start because zlib.dll was not found."


The ssleay32.dll problem was solved by getting hold of a couple of DLLs and putting them in the right place, as follows:

* Download "Win32 OpenSSL v0.9.8k Light" from http://www.slproweb.com/products/Win32OpenSSL.html.
* Run the installer, but take note of the following:
* You can ignore any initial warning about not having Microsoft Visual C++ 2008 Redistributables.
* You can ignore any warnings about command prompts being open.
* Install to somewhere like C:\OpenSSL - it doesn't really matter, we just need a couple of DLLs.
* When prompted, choose to Copy OpenSSL DLLS to The OpenSSL binaries (/bin) directory.
* Once the installer has completed, you can go to C:\OpenSSL\bin (or wherever you installed it) and copy the two files ssleay32.dll and libeay32.dll to your Ruby bin directory, C:\ruby191\bin in my case.

The zlib.dll problem was solved by in much the same way:

* Download the compiled zlib 1.2.3 DLL from http://www.zlib.net/ (about two thirds of the way down the page).
* Unzip it to get the zlib1.dll file.
* Put that file in your Ruby bin directory, but rename it to zlib.dll

Et voila - gems can now be installed successfully! Note that you may have had copies of some of these DLLs in your \WINDOWS\system32 directory already (I certainly did) but the problem is that they are too old. I prefer to put the newer ones directly in the Ruby bin directory, so only Ruby picks them up and it can't break anything else on the system.

http://alwaysthecritic.typepad.com/atc/2009/03/install-ruby-191-on-windows.html

Thursday, August 27, 2009

Ext Js Tutorial

http://extjs.com/learn/Tutorial:Introduction_to_Ext_2.0

Thursday, August 6, 2009

Rails 2.3 and Mysql 5.1

The title says it all. I wish Ruby on Rails wasn’t so difficult to get set up on Windows. It sounds like most Ruby on Rails developers are Mac OS X or Linux users.

I was just trying to get a basic app set up with MySQL 5.1, Rails 2.3 and Ruby 1.8.6 and got this error when trying to run rake db:migrate:

rake aborted!
undefined method `each’ for #

I found an answer here:

http://www.nabble.com/rake-aborted!-undefined-method-%60each%27-for–%3CMysql:-td20760472.html

Looks like most people uninstalled MySQL 5.1 and went back to 5.0. People also seemed to have better luck with Postgresql.

Source : http://peterskim.org/2009/04/12/mysql-51-with-rails-23ruby-186-on-windows-doesnt-work/

Also Comments :
I’m running MYSQL 5.1 and had a similar problem. I have Ruby 1.8.6. I followed these instructions and the undefined method error was resolved when running rake.
> The problem is that libmysql.dll shipped with Mysql doesn’t play well
> with ruby 2.2..
>
> The solution is to download the libmysql.dll from:
>
> http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll