Prev PageNext Page
Rails Select Tag and Onchange Event Calling a Remote Function with Default Option Selected
Here is a little code snippet that will fire off a request to update_client_path when you change the select field. This stands alone, rather than being apart of a larger form. The Client::CATEGORY argument is a hash, which I populated manually in my Clien...
Written by Sean Behan on 06/17/2012
Ruby Enterprise Edition and Passenger ./script/console production fails and instead returns Loading production environment (Rails 2.3.5) Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again: http://rubygems.rubyforge.org
After installing Ruby Enterprise Edition, REE, and Passenger on Ubuntu you may see this error message when you run script/console for the first time ./script/console production # => Loading production environment (Rails 2.3.5) Rails requires RubyGems >=...
Written by Sean Behan on 06/17/2012
How Many Gigs of RAM Are On My Server?
How much memory is on my linux server? Run the free command free -g total used free shared buffers cached Mem: 2 1 0 0 0 1 -/+ buffers/cache: 0 1 Swap: ...
Written by Sean Behan on 06/17/2012
Have Git Email Committers After Pushes
You need a Mail Transfer Agent MTA on the server. The easiest way is to install Sendmail, which Git uses by default. apt-get install sendmail Remember that /etc/hosts file needs the ip address to map to the domain name your sending mail from # vim /et...
Written by Sean Behan on 06/17/2012
Setting Up Users, Permissions and Groups for SSH Access to a Shared Git Repository
If you are having permission problems using git, such as error: insufficient permission for adding an object to repository database ./objects There are a couple thing you can do to remedy the situation, before moving to a full on git server like gitosis....
Written by Sean Behan on 06/17/2012
Installing and Using Rvm on Mac OS X, Creating Gemsets and Reverting to Original Environment
What is RVM and why should you use it? RVM is a Ruby interpreter, version management tool. In short, it enables you to switch between different versions and releases of Ruby (for instance, version 1.8.6, 1.8.7, jruby 1.9.2, ruby enterprise edition) on the...
Written by Sean Behan on 06/17/2012
Renaming Routes in Rails 3 with :As and :Controller
Renaming routes in Rails 2.* is straight forward. It goes something like this. ## config/routes.rb map.resources :users, :as => :members This will give you users_path and form_for(User.new) helpers, for instance, mapping the url to /members instead of ...
Written by Sean Behan on 06/17/2012
Combat Spam with the Akismet Class for Ruby
Here is the Akismet.rb class, written by David Czarnecki. I've seen several tutorials online using this class, however, the class isn't available at David's blog. So... I reposted it here and at the pastie link below http://pastie.org/1150693 ...
Written by Sean Behan on 06/17/2012
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
Written by Sean Behan on 06/17/2012
Uploading Files with Curl
curl -i -F name=test -F filedata=@localfile.jpg http://example.org/upload Courtesy of http://ariejan.net/2010/06/07/uploading-files-with-curl/
Written by Sean Behan on 06/17/2012
Prev PageNext Page