While upgrading an old project to Rails 2.0.2 (and having trouble getting the will_paginate plugin to install), I discovered that there is a will_paginate gem:
http://mislav.caboo.se/rails/will_paginate-love/
Railscasts - will_paginate
Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.
Showing posts with label gem. Show all posts
Showing posts with label gem. Show all posts
Saturday, April 26, 2008
Wednesday, March 12, 2008
Ruby Gem - Highline
I was looking for a way to prompt a user for input on the console and ran across the RubyGem HighLine. It does a lot more than this, but here's how to capture STDIN from the console:
Here's the output on the console:
Get it here:
HighLine
or simply install the gem the normal way:
$ sudo gem install highline
#!/usr/local/bin/ruby
require 'rubygems'
require 'highline/import'
username = ask("Enter your username: ") { |q| q.echo = true }
password = ask("Enter your password: ") { |q| q.echo = "*" }
Here's the output on the console:
$ ruby highline.rb
Enter your username: doug
Enter your password: ******
Get it here:
HighLine
or simply install the gem the normal way:
$ sudo gem install highline
Thursday, January 3, 2008
Thursday, July 5, 2007
Viewing Ruby Gem documentation
1) Command line
$ ri <gem_name>
2) Browser (http://localhost:8808)
$ gem_server
$ ri <gem_name>
2) Browser (http://localhost:8808)
$ gem_server
Friday, June 8, 2007
Ruby on Rails/Mongrel/Ubuntu
I've been using Ubuntu lately and decided to install Ruby on Rails and Mongrel.
Or download the source for the latest version (apt-get installs 1.8.4, but the latest source is 1.8.6):
Once ruby is installed, I typically use Gems if I can.
Download the latest Gems at http://rubyforge.org/frs/?group_id=126 (0.9.4 in this case) and then:
Install Rails:
Install Mongrel and Mongrel cluster gem plugin:
Install Apache 2.2
I got this error when running configure:
Adding this option fixed the problem:
Running Apache with a single Mongrel Instance
Add to apache conf (httpd.connf)
Restart Apache and it will forward requests for www.hostname.com on port 80 to Mongrel server running on port 8000.
$ sudo apt-get install ruby irb rdoc
Or download the source for the latest version (apt-get installs 1.8.4, but the latest source is 1.8.6):
$ tar zxvf ruby-1.8.6.tar.gz
$ cd ruby-1.8.6
$ ./configure
$ make
$ sudo make install
Once ruby is installed, I typically use Gems if I can.
Download the latest Gems at http://rubyforge.org/frs/?group_id=126 (0.9.4 in this case) and then:
$ tar xzvf rubygems-0.9.4.tgz
$ cd rubygems-0.9.4
$ sudo ruby setup.rb
Install Rails:
sudo gem install rails --include-dependencies
Install Mongrel and Mongrel cluster gem plugin:
sudo gem install mongrel --include-dependencies
sudo gem install mongrel_cluster
Install Apache 2.2
$ tar zxvf httpd-2.2.4.tar.gz
$ cd httpd-2.2.4
$ ./configure \
--prefix=/usr/local/apache \
--enable-rewrite \
--enable-headers \
--enable-ssl \
--enable-proxy \
--with-mpm=prefork
$ make
$ sudo make install
I got this error when running configure:
Configuring Apache Portable Runtime Utility library...
checking for APR-util... yes
configure: error: Cannot use an external APR-util with the bundled APR
make: *** [apache] Error 1
Adding this option fixed the problem:
--with-included-apr
Running Apache with a single Mongrel Instance
$ mongrel_rails start -p 8000 -e production -d
Add to apache conf (httpd.connf)
ServerName hostname.com
ServerAlias www.hostname.com
ProxyPass / http://www.hostname.com:8000/
ProxyPassReverse / http://www.hostname.com:8000/
ProxyPreserveHost on
Restart Apache and it will forward requests for www.hostname.com on port 80 to Mongrel server running on port 8000.
Subscribe to:
Posts (Atom)
About Me
- Doug Sparling
- Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.
Labels
- .NET (8)
- accordion (1)
- ActiveRecord (1)
- ajax (2)
- APT (1)
- apt-get (1)
- ASP (1)
- ASP.NET .NET (5)
- Audio (1)
- aws (1)
- Bash (1)
- bdd (1)
- C# (1)
- cache_fu (1)
- caching (1)
- DocBook (1)
- DOM (1)
- Eclipse (1)
- Excel (1)
- Firefox (1)
- gem (5)
- Gems (5)
- git (1)
- GridView (2)
- Hibernate (1)
- iBATIS (1)
- Java (9)
- javascript (9)
- javascript css (1)
- jQuery (4)
- jsspec (1)
- mdb2 (2)
- Merb (2)
- mongrel (2)
- mp3 (2)
- Music (2)
- MySQL (2)
- nginx (1)
- openssl (1)
- osx (3)
- pdocast (1)
- pear (2)
- Perl (7)
- php (5)
- plugin (2)
- podcast (1)
- prototype (1)
- REST (1)
- RMagick MacOSX (1)
- rspec (1)
- ruby (14)
- ruby on rails (21)
- RubyGems Merb (1)
- s3 (1)
- screencasts (1)
- scriptaculous (1)
- scriptrunner ruby rails erlang (1)
- Sortable (1)
- subversion (1)
- testing (1)
- testing erlang tsung (1)
- tomcat (1)
- ubuntu (2)
- WebSphere (1)
- will_paginate (1)