Sunday, April 4, 2010

Custom APN for iphone 3G OS > 3.0 (for me Airtel India)

First enable Custom APN: http://www.troublefixers.com/how-to-enable-gprsedgeapn-settings-in-jailbroken-iphone-3gs/

Now go to: Settings->General->Network->Cellular Data Network->
Change APN of Cellular Data to your APN (Airtel: airtelgprs.com).

Restart

Friday, March 19, 2010

Lovd by Less on Ruby on Rails on Ubuntu

1. install ubuntu 8.04 -> LAMP+SSH

2. sudo aptitude install ruby build-essential libopenssl-ruby ruby1.8-dev

3. RubyGems. Normal way: sudo apt-get install rubygems.
BUT WE CANNOT DO THIS AS 1.3.6 gives error, so we will install 1.3.5 manuall.
Download 1.3.5 from http://rubyforge.org.
Unzip and run:
a) sudo apt-get install ruby-full
b) sudo ruby setup.rb
c) sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
NO UPDATE!!!!!!!!!!!!!!!!!

4. sudo gem install rails

5. Test: go to home-> rails (mkdir!): rails test -d mysql
Something happens and no error? :D

6. sudo apt-get install libmysql-ruby libmysqlclient-dev (this might ask you to install libmysqlclient15-dev)

7. sudo gem install mysql

8. sudo gem install passenger

9. sudo apt-get install apache2-dev (suggestion: apache2-threaded-dev) libapr1-dev libaprutil1-dev

10. sudo passenger-install-apache2-module
do as the script says: update /etc/apache2/apache2.conf and VirtualHost stuff

11. sudo a2enmod rewrite

12. sudo /etc/init.d/apache2 restart

AT THIS POINT YOU HAVE RUNNING RUBY ON RAILS!

Now to Lovd by Less

13. Follow Quick Setup from README of LovdByLess
I had to comment out in config/environment.rb, RAILS_GEM_VERSION to use the latest version installed.

14. Missing gems:
gem install hpricot
rflickr
rmagick (requires: sudo apt-get install imagemagick libmagick9-dev)

15. After Quick -> start with step 6 i n README (or whatever it says!)

16. flickr - problem with hpricot version. The README says 0.6.. and I got 0.8.2.
SO - update version in config/environment.rb

17. rake ts:start might give error first time. Ignore and carry on.

18. ./script/server is not executable. Make it executable!

MAYBE begin
19. I got database config error. I had to enter in config/database.yml, values for production.

20. Then I got "uninitialized constant ApplicationController" -> go to app/controllers and do: mv application.rb application_controller.rb
MAYBE end

21. Finish the README steps

22. It only works on ipaddress:3000 (development mode?). But I want it to run in apache!