Archive for the ‘Ruby on Rails’ Category
Released my first RubyGem ‘BabyNames’
I often find myself always writing seed data and repeating myself. Trying to make it as ‘real’ as possible instead of just “test1”, “test2”, “test3” etc. So here is a gem that will simplify all of that! See babynames on github for more details or find it on rubygems.org require ‘rubygems’ require ‘babynames’ person = […]
In: Ruby on Rails · Tagged with: babynames, rubygems
Error with passenger-install-nginx-module – Could not find RubyGem passenger (>= 0) (Gem::LoadError)
If you are troubled with passenger-install-nginx-module /home/web90seconds/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error’: Could not find RubyGem passenger (>= 0) (Gem::LoadError) Then try sudo env GEM_HOME=$GEM_HOME /home/me/.rvm/gems/ruby-1.9.2-p180/bin/passenger-install-nginx-module Obviously change the location of your passenger-install-nginx-module binary.
In: Ruby on Rails, Server Config · Tagged with: nginx, phusion passenger, ruby 1.9.2
Gem Install Error – no such file to load — zlib
If you are troubled with the below gem install ERROR: Loading command: install (LoadError) no such file to load — zlib ERROR: While executing gem … (NameError) uninitialized constant Gem::Commands::InstallCommand Then you have installed ruby without the nessacary libraries available. Remove the ruby install (hopefully just rvm remove 1.9.2) Then install zlib1g-dev libssl-dev libreadline5-dev as […]
In: Ruby on Rails, Server Config · Tagged with: Ubuntu Lucid Lynx 10.04
Rails or Ruby Memcached Gem on Ubuntu and Linux
Get the following error when trying to install memcached ruby gem on your Ubuntu or Linux box? rlibmemcached_wrap.c: In function ‘_wrap_memcached_get_sasl_callbacks’: rlibmemcached_wrap.c:12413: error: ‘sasl_callback_t’ undeclared (first use in this function) rlibmemcached_wrap.c:12413: error: ‘result’ undeclared (first use in this function) rlibmemcached_wrap.c:12424: error: expected expression before ‘)’ token rlibmemcached_wrap.c: In function ‘Init_rlibmemcached’: rlibmemcached_wrap.c:13694: error: ‘SASL_OK’ undeclared (first […]
In: Ruby on Rails, Server Config, Ubuntu Tricks · Tagged with: Memcached, Ruby, rubygems
How To – Persist Rails or IRB Console Command History After Exit
Sick of not having Ubuntu rails or irb terminal not saving your command history after exiting the console? Try this little trick to fix it up! Append into your ~/.irbrc the following
In: How To, Ruby on Rails, Ubuntu Tricks · Tagged with: console, irb, ruby on rails, Ubuntu
Redis will not time out. Try installing the SystemTimer gem.
WARNING: Could not find a good alternative for performing time outs — connecting to Redis will not time out. Try installing the SystemTimer gem. rake aborted! undefined method `get’ for nil:NilClass WARNING: Could not find a good alternative for performing time outs — connecting to Redis will not time out. Try installing the SystemTimer gem.rake […]
In: Ruby on Rails, Server Config · Tagged with: redis, resque, system_timer
sqlite3 Issues – Error installing sqlite3 – sqlite3 requires Ruby version >= 1.9.1
Errors as follows, common problem is not having the header files installed or installing the gem sqlite3 when you actually want sqlite3-ruby. sudo gem install sqlite3 ERROR: Error installing sqlite3: sqlite3 requires Ruby version >= 1.9.1. Fix with:
In: Ruby on Rails, Server Config · Tagged with: sqlite3-ruby, Ubuntu Lucid Lynx 10.04
RubyGem nokogiri failed to install – libxslt is missing – Error installing nokogiri
Had trouble installing nokogiri until I installed dependencies. libxslt is missing #or libxml2 sudo apt-get install libxslt-dev libxml2-dev Full Error Stacktrace:
In: Ruby on Rails, Server Config · Tagged with: nokogiri, rubygems, Ubuntu Lucid Lynx 10.04