Archive for the ‘Ruby on Rails’ Category
Memcached – Libmemcached already built; run ‘rake clean’ first if you need to rebuild.
Trying to install memcached ruby gem on Ubuntu 10.04 Lucid Lynx and I get the error Libmemcached already built; run ‘rake clean’ first if you need to rebuild. Fixed this by installing sudo apt-get install libsasl2-dev gem uninstall memcached && gem install memcached Full Error Stacktrace:
In: Ruby on Rails, Server Config, Ubuntu Tricks · Tagged with: Memcached, rubygems, Ubuntu Lucid Lynx 10.04
Developing Ruby on Rails on Ubuntu Lucid Lynx 10.04
Update: For Installing Ruby on Rails onto a Ubuntu Server (Lucid Lynx 10.04) goto this post Developing for any Web Application can be helped by developing in the same environment as the deployment. For me this means that running Ubuntu Desktop and deploying onto Ubuntu Server is a no brainer. Most Ruby on Rails developers […]
In: Ruby on Rails, Server Config · Tagged with: Ubuntu Lucid Lynx 10.04
Sending Emails with Rails, multipart html plain with Attachments
When trying to send attachments along with type versons of an email (html and plain text) you might notice that there is no content in your email message. While I found this out too. Simple if not over the top solution. The trick is that you have to put the html and plain part inside […]
In: Ruby on Rails · Tagged with: attachments, email, multipart
what changes did I just pull from git?
Ever wanted to see what changes you just pulled from github? This little command will show you the changes for the last commit, if the pull resulted in more commits being pulled then add a couple more ‘^’s to HEAD^ git diff HEAD^ HEAD
In: Ruby on Rails · Tagged with: git
Git cherry-pick
cherry-pick is a useful Git command, especially if you are working in an Agile team. We used it for the first time today on our project. Team member A lets call him “James” made a feature and put it onto master. Team member B lets call him “Jordan” later refactered some code from “James”‘s feature. […]
In: Ruby on Rails · Tagged with: git
uninitialized constant Encoding
Problem with Rails sqlite3? uninitialized constant Encoding Couldn’t create database for {“timeout”=>5000, “adapter”=>”sqlite3”, “database”=>”db/test.sqlite3”, “pool”=>5} If you installed the gem ‘sqlite3’ then sudo gem uninstall sqlite3 sudo gem install sqlite3-ruby Fixed!
In: Ruby on Rails · Tagged with: Rails, sqlite3, sqlite3-ruby
PostGIS psqlostgis ERROR could not load library /usr/lib/postgresql/8.4/lib/postgis-1.5.so
Trying to install PostGIS and you can’t get past this error? psqlostgis.sql:57: NOTICE: type “spheroid” is not yet defined DETAIL: Creating a shell type definition. psqlostgis.sql:57: ERROR: could not load library “/usr/lib/postgresql/8.4/lib/postgis-1.5.so”: /usr/lib/postgresql/8.4/lib/postgis-1.5.so: undefined symbol: GEOSHausdorffDistance psqlostgis.sql:63: ERROR: current transaction is aborted, commands ignored until end of transaction block psqlostgis.sql:68: ERROR: current transaction is aborted, […]
In: Ruby on Rails, Server Config · Tagged with: error, ldconfig, PostGIS, postgresql, problem
Fetch Email Attachments with Ruby on Rails
This snippet is used in one of my projects to automatically import a csv into the database. It uses cron to check an email account via IMAP. When a unread email is found it will try to match it to subject lines in the database. If there is an entry it will attempt to import […]
In: Ruby on Rails · Tagged with: attachment, automation, cron, email, import, TMail