Posted 26 days back at Phusion Corporate Blog
We host many git repositories on our servers using SSH and file system ACLs for access control. However, having been spoiled by Github for so long, this method feels archaic and cumbersome. While Github provides private repositories, sometimes it’s just not an option because there are some things that may never leave the organization. If you still want to have a fancy web interface for your Git repositories, then there are several alternatives:
Gitlab is an excellent option. It’s not as fully featured as Github, but like Gitorious it is open source. We’ve found that it’s not only more user friendly than Gitorious but also easier to install.

This tutorial teaches you how to setup Gitlab on Debian 6, Ruby 1.9.3, Phusion Passenger and Nginx. It assumes that Gitlab and the git repositories are hosted on the same machine. Your Gitlab installation will be protected by SSL. Your users will be able to pull from and push to your repositories using the ssh:// protocol, but they won’t have actual shell access and you don’t need to have separate system accounts for each user to control access. Gitlab (or to be more correct, gitolite, which Gitlab uses) manages access without system accounts.
Step 1: Setup sudo
In this tutorial we’re going to use sudo to switch between user accounts. Sudo is not installed by default on Debian so install it if you don’t already have it:
$ su
# apt-get update
# apt-get install sudo
Now add your own account to /etc/sudoers:
# visudo
Add something like this to the end of the file:
your_username_here ALL=(ALL) ALL
Step 2: Install the base software
Install basic dependencies:
$ sudo apt-get update
$ sudo apt-get install build-essential git-core wget curl gcc checkinstall libxml2-dev libxslt-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libreadline-dev libc6-dev libssl-dev libmysql++-dev make build-essential zlib1g-dev libicu-dev redis-server openssh-server python-dev python-pip libyaml-dev
Install Pygments, which Gitlab needs for syntax highlighting:
$ sudo pip install pygments
Gitlab needs the sendmail command in order to send emails (for things like lost password recovery). This command is provided by the exim4, postfix and sendmail packages but you can only have one of them installed. If you don’t already have one of them installed, then we recommend postfix.
First, check whether you already have the sendmail command:
$ ls /usr/sbin/sendmail
If you get a ‘file not found’ then install Postfix:
$ sudo apt-get install postfix
Step 3: Install gitolite
We need gitolite. Gitolite is a tool used by Gitlab for managing access control to git repositories. It works by providing a bunch of config files in which you can register users and their public keys. Gitolite modifies ~/.ssh/authorized_keys appropriately based on the config files’ contents. Gitolite is not supposed to run as root; instead, it runs as a single user.
Install gitolite:
$ sudo apt-get install gitolite
The Debian package will automatically create an account called gitolite. Gitlab controls gitolite by logging into gitolite’s user account through SSH, so we want to create a passwordless SSH keypair for this. This SSH keypair is what we call the gitolite admin key.
$ sudo -u gitolite ssh-keygen
...
Enter file in which to save the key (/var/lib/gitolite/.ssh/id_rsa): <--- enter nothing here and press enter
...
Enter passphrase (empty for no passphrase): <--- enter nothing here and press enter
Enter same passphrase again: <-- enter nothing here and press enter
...
Your public key has been saved in /var/lib/gitolite/.ssh/id_rsa.pub.
...
Now you need to tell gitolite that you want to use this key as the admin key. First, let’s print the content of the public key and copy it to the clipboard:
$ sudo -u gitolite cat /var/lib/gitolite/.ssh/id_rsa.pub
(now select the output in your terminal and copy it to the clipboard)
Now let’s configure gitolite:
$ sudo dpkg-reconfigure gitolite
When asked for a username, keep it at the default:

When asked for a repository path, keep it at the default:

When asked for the admin key, paste the contents of the key you copied to clipboard:

Finally, we need to set the REPO_MASK option to 0007.
$ sudo -u gitolite vi /var/lib/gitolite/.gitolite.rc
Look for:
$REPO_UMASK = 0077; # gets you 'rwx------'
Change it to:
$REPO_UMASK = 0007; # rwxrwx---
Tighten security
We think the default gitolite home directory security is a bit weak: everybody on the system can access the config files and the repository files.
$ ls -ld /var/lib/gitolite
drwxr-xr-x 5 gitolite gitolite 4096 Apr 21 08:40 /var/lib/gitolite
Let’s tighten it up a little bit so that only gitolite can access the files:
$ sudo -u gitolite chmod o-rx /var/lib/gitolite
Step 4: Install Ruby 1.9
Gitlab requires Ruby 1.9 and their developers recommend Ruby 1.9.2, but we don’t recommend 1.9.2 because it has a lot of critical bugs compared to 1.9.3. We’ve been running Gitlab in production on Ruby 1.9.3 for a while now and so far everything works great, so in this tutorial we’ll teach you how to install Ruby 1.9.3. But feel free to install a different version if you disagree with us.
Debian does not provide a recent enough version of Ruby through apt, so we need to install it manually.
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
$ tar xzvf ruby-1.9.3-p194.tar.gz
$ cd ruby-1.9.3-p194
$ ./configure
$ make
$ sudo make install
Install Bundler:
$ sudo gem install bundler
Step 5: Install Gitlab
Download the source
$ cd /opt
$ sudo git clone git://github.com/gitlabhq/gitlabhq.git
$ sudo chown -R gitolite:gitolite gitlabhq
$ cd gitlabhq
$ sudo -u gitolite git checkout 9af14e4bda35
(You can also checkout the stable branch for the latest stable version, but this tutorial is written specifically for commit 9af14e4bda35.)
Configure
Setup the database configuration. Make sure you fill in the database details under the production section.
$ sudo -u gitolite cp config/database.yml.example config/database.yml
$ sudo -u gitolite vi config/database.yml
Setup other Gitlab configuration.
$ sudo -u gitolite cp config/gitlab.yml.example config/gitlab.yml
$ sudo -u gitolite vi config/gitlab.yml
- Set
email.from to what should be filled in the ‘From’ header in emails.
- Set
email.to to the domain name on which you want to host Gitlab, without the protocol scheme and without the path.
- Set
email.protocol to https.
- Set
git_host.admin_uri to gitolite@localhost:gitolite-admin.
- Set
git_host.base_path to /var/lib/gitolite/repositories/.
- Set
git_host.host to the system’s SSH domain name.
- Set
git_host.git_user to gitolite.
Now tighten up security:
$ sudo -u gitolite chmod o-rwx config/*.yml
Install gems and setup database
$ sudo -u gitolite -H bundle install --without development test --deployment
$ sudo -u gitolite bundle exec rake db:setup RAILS_ENV=production
$ sudo -u gitolite bundle exec rake db:seed_fu RAILS_ENV=production
This last command will output an initial administrator account’s username and password. Write it down somewhere.
Check status
$ sudo -u gitolite bundle exec rake gitlab:app:status RAILS_ENV=production
You should get all YES:
Starting diagnostic
config/database.yml............exists
config/gitlab.yml............exists
/home/git/repositories/............exists
/home/git/repositories/ is writable?............YES
remote: Counting objects: 603, done.
remote: Compressing objects: 100% (466/466), done.
remote: Total 603 (delta 174), reused 0 (delta 0)
Receiving objects: 100% (603/603), 53.29 KiB, done.
Resolving deltas: 100% (174/174), done.
Can clone gitolite-admin?............YES
UMASK for .gitolite.rc is 0007? ............YES
Run a Resque worker
This worker daemon is for processing background tasks.
$ sudo -u gitolite bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production BACKGROUND=yes
Step 6: Generate an SSL certificate
Generate a self-signed certificate. You may enter arbitrary certificate information but the Common Name must be set to the domain name on which you want to host Gitlab.
$ cd /opt/nginx/conf
$ sudo openssl req -new -x509 -nodes -days 3560 -out gitlab.crt -keyout gitlab.key
$ sudo chmod o-r gitlab.key
Installing the certificate into your browser
This self-signed certificate by itself provides encryption, but not authentication, making it vulnerable to man-in-the-middle attacks. To solve this problem, install this certificate into your browser.
Here’s how you do it on Google Chrome on OS X. First, copy the certificate to your local machine:
$ scp your-server.com:/opt/nginx/conf/gitlab.crt .
Now open Keychain Access. Under the “Keychains” list, select “System”. Then click on the “+” button and add the certificate file.

Step 7: Deploy to Phusion Passenger and Nginx
Install Nginx and Phusion Passenger:
$ sudo gem install passenger --no-rdoc --no-ri
$ sudo passenger-install-nginx-module
(Choose option 1 and install Nginx to /opt/nginx)
Now edit the Nginx config file
$ sudo vi /opt/nginx/conf/nginx.conf
and add this to the http block:
# This is a normal HTTP host which redirects all traffic to the HTTPS host.
server {
listen 80;
server_name gitlab.yourdomain.com;
root /nowhere;
rewrite ^ https://gitlab.phusion.nl$request_uri permanent;
}
# The actual Gitlab HTTPS host.
server {
listen 443;
server_name gitlab.yourdomain.com;
root /opt/gitlabhq/public;
ssl on;
ssl_certificate gitlab.crt;
ssl_certificate_key gitlab.key;
add_header Strict-Transport-Security "max-age=315360000";
location / {
passenger_enabled on;
}
location /assets {
expires max;
add_header Cache-Control public;
passenger_enabled on;
}
}
Now start Nginx:
$ sudo /opt/nginx/sbin/nginx
And viola, you’re up and running! You can access Gitlab through https://gitlab.yourdomain.com/.
Already have Phusion Passenger installed and already running Ruby 1.8?
Phusion Passenger for Nginx does not yet support multiple Ruby versions (but it will in 3.2). If you already have Ruby apps deployed on your server using Phusion Passenger, and those apps require Ruby 1.8, then you’ll have to run Gitlab on Ruby 1.9 using Phusion Passenger Standalone, and connect it to Nginx through a reverse proxy setup.
$ cd /opt/gitlabhq
$ sudo -u gitolite passenger start -d -e production --max-pool-size 2 -S gitlab.socket
The HTTPS server block should then look like this:
upstream gitlab {
server unix:/opt/gitlabhq/gitlab.socket;
}
# The actual Gitlab HTTPS host.
server {
listen 443;
server_name gitlab.yourdomain.com;
root /opt/gitlabhq/public;
ssl on;
ssl_certificate gitlab.crt;
ssl_certificate_key gitlab.key;
add_header Strict-Transport-Security "max-age=315360000";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Ssl on;
location / {
if (!-f $request_filename) {
proxy_pass http://gitlab;
break;
}
}
location /assets {
expires max;
add_header Cache-Control public;
if (!-f $request_filename) {
proxy_pass http://gitlab;
break;
}
}
}
Donate
Gitlab started a donation campaign a few weeks ago. It is excellent, high-quality open source software so if you like it, consider giving them a donation to support their development.

Posted 26 days back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home

We’ve used Cucumber heavily and successfully on client work, internal projects, and open source. We also love RSpec, so when we heard that Turnip would give the ability to run Gherkin based integration tests in our RSpec suite it was a no-brainer for us to try it out on a project.
Highlights of Turnip
- Integrates directly into your RSpec test suite
- Features and Step definitions live in the spec directory
- No need to maintain two configuration files
- Uses Ruby style symbols instead of regular expressions in step definitions
- No need to write Given/When/Then in the step definitions file
- Speed boost when running unit tests and integration tests together
We use Cucumber integration tests in thoughtbot’s clearance gem. In the example below I remove Cucumber and replace it with Turnip.
Steps used to change from Cucumber to Turnip
- Set up your
features directory inside the spec directory
- Remove the Given/When/Then’s from the step definitions
- Replace regular expressions in the step definitions with Ruby style symbols
Cucumber and Turnip use the same Gherkin syntax:
Scenario: Visitor signs up with valid data
When I sign up with "email@example.com" and "password"
Then I should be signed in
Change the step definitions from Cucumber to Turnip style:
# Cucumber step definition
When /^I sign up (?:with|as) "(.*)" and "(.*)"$/ do |email, password|
visit sign_up_path
page.should have_css("input[type='email']")
fill_in "Email", :with => email
fill_in "Password", :with => password
click_button "Sign up"
end
# Turnip step definition
step "I sign in with/as :email and :password" do |email, password|
visit sign_in_path
page.should have_css("input[type='email']")
fill_in "Email", :with => email
fill_in "Password", :with => password
click_button "Sign in"
end
Run the test suite
An advantage having everything running through RSpec is we get an immediate boost in speed when running the whole test suite. With Cucumber running Rake will run the RSpec and Cucumber tests (the Rails environment will be loaded twice). With Turnip all tests run through directly through RSpec (the Rails environment is only loaded once).
We save around 12 seconds when running the entire suite:
# Rake running RSpec and Cucumber
~/Development/clearance_cucumber(master) $ time rake
/Users/training/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S rspec ./spec/controllers/pages_controller_spec.rb ./spec/helpers/application_helper_spec.rb
.
Finished in 0.10696 seconds
1 example, 0 failures
/Users/training/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S bundle exec cucumber --profile default
Using the default profile...
.................................................
13 scenarios (13 passed)
49 steps (49 passed)
0m1.729s
rake 19.97s user 2.71s system 98% cpu 22.960 total
# RSpec with Turnip
~/Development/clearance_turnip(master?) $ time rspec
..............
Finished in 1.84 seconds
14 examples, 0 failures, 0 pending
rspec 8.85s user 1.06s system 95% cpu 10.362 total
Takeaways
- Great light-weight solution for anyone already using RSpec
- Step definitions easier to read than their Cucumber counterparts
- Low barrier to entry for developers new to integration testing
Posted 27 days back at Segment7
The Mechanize library is used for automating interaction with websites.
Mechanize automatically stores and sends cookies, follows redirects, and
can follow links and submit forms. Form fields can be populated and
submitted. Mechanize also keeps track of the sites that you have visited
as a history.
Changes
-
Security fix:
Mechanize#auth and Mechanize#basic_auth allowed disclosure of passwords to
malicious servers and have been deprecated.
In prior versions of mechanize only one set of HTTP authentication
credentials were allowed for all connections. If a mechanize instance
connected to more than one server then a malicious server detecting
mechanize could ask for HTTP Basic authentication. This would expose the
username and password intended only for one server.
Mechanize#auth and Mechanize#basic_auth now warn when used.
To fix the warning switch to Mechanize#add_auth which requires the URI
the credentials are intended for, the username and the password. Optionally
an HTTP authentication realm or NTLM domain may be provided.
-
Minor enhancement
Posted 27 days back at WyeWorks Blog - Home
rails-api is a plugin developed by Yehuda Katz, José Valim, Carlos Antonio da Silva and me (Santiago Pastorino) which modifies Rails applications trimming down usually unneeded Rails functionalities for API applications.
Do you remember we added support for this on core and it was reverted?. This plugin enables that again.
What is an API app?
Traditionally, when people said that they used Rails as an "API", they meant providing a programmatically accessible API alongside their web application. For example, GitHub provides an API that you can use from your own API clients.
Why using this instead of Rails?
Because you don't need the entire Rails middleware stack. Specifically you won't need middleware that are meant for browser applications. For example you probably won't need cookies support, but you can add that back if you want. You don't need most of the functionality provided by ActionController::Base like template generation for instance. And you won't need generated views, helpers and assets. The plugin also skips the asset pipelining.
Configuration
For existing Rails applications you need …
- To add gem 'rails-api' to your Gemfile
- Make ApplicationController inherit from ActionController::API instead of ActionController::Base. As with middleware, this will leave out any ActionController module that provides functionality primarily used by browser applications.
- Remove respond_to from your controllers and just use render :json instead.
For new apps
Install the gem if you haven't already:
gem install rails-api
Then generate a new Rails API application:
rails-api new my_api
And that's it, when you use the generators by default controllers will respond to json only.
Middlewares
An api application comes with the following middlewares by default.
- Rack::Cache: Caches responses with public Cache-Control headers using HTTP caching semantics.
- Rack::Sendfile: Uses a front-end server's file serving support from your Rails application.
- Rack::Lock: If your application is not marked as threadsafe (
config.threadsafe!), this middleware will add a mutex around your requests.
- ActionDispatch::RequestId
- Rails::Rack::Logger
- Rack::Runtime: Adds a header to the response listing the total runtime of the request.
- ActionDispatch::ShowExceptions: Rescue exceptions and re-dispatch them to an exception handling application.
- ActionDispatch::DebugExceptions: Log exceptions.
- ActionDispatch::RemoteIp: Protect against IP spoofing attacks.
- ActionDispatch::Reloader: In development mode, support code reloading.
- ActionDispatch::ParamsParser: Parse XML, YAML and JSON parameters when the request's Content-Type is one of those.
- ActionDispatch::Head: Dispatch HEAD requests as GET requests, and return only the status code and headers.
- Rack::ConditionalGet: Supports the
stale? feature in Rails controllers.
- Rack::ETag: Automatically set an ETag on all string responses. This means that if the same response is returned from a controller for the same URL, the server will return a 304 Not Modified, even if no additional caching steps are taken. This is primarily a client-side optimization; it reduces bandwidth costs but not server processing time.
Other plugins, including ActiveRecord, may add additional middlewares. In general, these middlewares are agnostic to the type of app you are building, and make sense in an API-only Rails application.
You can get a list of all middlewares in your application via:
rake middleware
Other Middlewares
Rails ships with a number of other middlewares that you might want to use in an API app, especially if one of your API clients is the browser:
- Rack::MethodOverride: Allows the use of the _method hack to route POST requests to other verbs.
- ActionDispatch::Cookies: Supports the cookie method in ActionController, including support for signed and encrypted cookies.
- ActionDispatch::Flash: Supports the flash mechanism in ActionController.
- ActionDispatch::BestStandards: Tells Internet Explorer to use the most standards-compliant available renderer. In production mode, if ChromeFrame is available, use ChromeFrame.
- Session Management: If a config.session_store is supplied, this middleware makes the session available as the session method in ActionController.
Any of these middlewares can be added via:
config.middleware.use Rack::MethodOverride
Removing Middlewares
If you don't want to use a middleware that is included by default in the api middleware set, you can remove it using config.middleware.delete:
config.middleware.delete ::Rack::Sendfile
Keep in mind that removing these features may remove support for certain features in ActionController.
Choosing Controller Modules
An api application (using ActionController::API) comes with the following controller modules by default:
- ActionController::UrlFor: Makes url_for and friends available
- ActionController::Redirecting: Support for redirect_to
- ActionController::Rendering: Basic support for rendering
- ActionController::Renderers::All: Support for render :json and friends
- ActionController::ConditionalGet: Support for stale?
- ActionController::ForceSSL: Support for force_ssl
- ActionController::RackDelegation: Support for the request and response methods returning ActionDispatch::Request and ActionDispatch::Response objects.
- ActionController::DataStreaming: Support for send_file and send_data
- AbstractController::Callbacks: Support for before_filter and friends
- ActionController::Instrumentation: Support for the instrumentation hooks defined by ActionController (see the source for more).
- ActionController::Rescue: Support for rescue_from.
Other plugins may add additional modules. You can get a list of all modules included into ActionController::API in the rails console:
ActionController::API.ancestors - ActionController::Metal.ancestors
Adding Other Modules
All Action Controller modules know about their dependent modules, so you can feel free to include any modules into your controllers, and all dependencies will be included and set up as well.
Some common modules you might want to add:
- AbstractController::Translation: Support for the l and t localization and translation methods. These delegate to I18n.translate and I18n.localize.
- ActionController::HTTPAuthentication::Basic (or Digest or Token): Support for basic, digest or token HTTP authentication.
- AbstractController::Layouts: Support for layouts when rendering.
- ActionController::MimeResponds: Support for content negotiation (respond_to, respond_with).
- ActionController::Cookies: Support for cookies, which includes support for signed and encrypted cookies. This requires the cookie middleware.
The best place to add a module is in your ApplicationController. You can also add modules to individual controllers.
How can I help?
Reporting issues, testing it in real apps and providing bug fixes here: https://github.com/spastorino/rails-api. We have been measuring the plugin against some applications and we will post more about the results later. Meanwhile, if you can test it and share the improvements you found in your apps, would be awesome. To be able to add this functionality to core we need the plugin to show significant performance improvements for real API applications, so it's important to let us know about your results.
<3 <3 <3 Find me at RailsConf. Tenderlove and I are giving out hugs for free!
Posted 27 days back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home
factory_girl
There’s a new version of factory_girl this week, as usual: 3.1.1 (aa81d2f).
Mark Rushakoff (mark-rushakoff) fixed a typo (4682ab0).
Have I mentioned how much I love documentation fixes? Because I do.
Joshua Clayton (joshuaclayton) ensured that FactoryGirl.attributes_for works with has_many associations (50be545).
He also refactored Strategies to be modules instead of classes, and added an Evaluation façade to make building strategies easier (89d5e94).
flutie
flutie got some love this
week from Edwin Morris (ehmorris),
who changed values from pixels to ems (fd26ed0) and these new-fangled CSS3 “rems”. REMs
are relative to the base element’s size, not to the parent’s size
(more here).
I wish I’d had that back in the day.
paperclip
paperclip got a bunch of bug fixes from Prem Sichanugrist (sikachu).
He fixed the content_type validator to allow blanks and nils (5eed1dc), ensured that code dealt with the content type, not the MimeType (3f1d30f), closed ALL the files (4f6d482), and removed unused code (yay!) (02eb725).
Sebastien Guignot (sguignot) fixed attachment.reprocess! when using Fog or S3
(9d1355b).
Kir Maximov (kir) fixed a problem with an incorrect content_type
(3e98fc2).
shoulda-matchers
shoulda-matchers continues to improve.
Gabe Berke-Williams (gabebw - that’s me!)
added tests for Rails 3.2 (aff2824)
and bumped rspec-rails (5baa056). As ever,
the NEWS file is the place to watch for updates to functionality.
Aaron Gibralter (agibralter) fixed
the ensure_length_of matcher to check for all possible I18n error
messages (0a8e652),
meaning our internationalized users aren’t left with false negatives in their
tests.
Victor Pereira () added the
in_array method (e40e2cb)
to the ensure_inclusion_of, meaning you can do
it { should ensure_inclusion_of(:attribute).in_array(%w[cat dog]) now.
Posted 27 days back at The Ruby Show
Peter and Jason talk about Passenger 3.2, MacRuby books, Authority, Fake S3, and more.
Posted 27 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
Michael Nygard outlines 8 rules for dealing with complex systems: Embrace Plurality, Contextualize Downstream, Beware Grandiosity, Decentralize, Isolate Failure Domains, Data Outlives Applications, Applications Outlive Integrations, Increase Discoverability. By Michael Nygard
Posted 27 days back at GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home
We’ve had an abnormally warm Winter and Spring in Boston this year, but thoughtbot likes it EVEN HOTTER so we’re going south to Austin. As a bonus, Railsconf is there. If you’d like to meet a real, live thoughtbot employee, here’s who you can expect to see there:
Chad is the CEO of thoughtbot. You may recognize him from books like Backbone.js on Rails or movies like Humans Present: tmux. Chad’s been focusing on workshops and other learning materials. If you have an idea for a book, screencast, or workshop, come find Chad. I’m sure he’d love to hear about it!
Matt is our COO. He’s into movies, too, and he’s the mastermind behind such open source works as flutie and pacecar. If you have an idea for a web app or want to discuss your favorite kind of trail mix, look for Matt.
Joe isn’t always the CTO of thoughtbot, but when he is…actually, he always is. Joe is the original author of factory_girl and capybara-webkit. He’ll be working on those, as well as his secret project with Mike Burns. If you’re interested in any of those things, come find Joe.
Jon is one of the co-founders of thoughtbot. He wrote the paperclip gem. You may have heard of it. It’s kind of a big deal. He also wrote the excitingly-named cocaine. If you want to help out with paperclip, find Jon.
Mike is a long time thoughtbotter and just moved to Stockholm. He loves open source, Swedish slang, and the Oxford comma. If you want to discuss open source or pull requests, just follow your nose to the…well, look for Mike.
Josh likes testing more than he likes food or oxygen. He’s also the maintainer of factory_girl. If you want to yell about testing or factory_girl, Josh is ya boi.
Ben is a speaker and conference enthusiast. If you’re at a conference, look for Ben’s name. He’s probably on the speaker list under “v” for “Vim.” If you want to talk about speaking, Vim, or travel, you can’t do much better than Ben.
Prem is a frequent contributor to Rails (you may have heard of it), paperclip, and other open source libraries. If you have a strange problem with paperclip, the asset pipeline, or Rails in general, look for Prem; I bet he can tell you what’s happening.
Gabe brings humor, vocabulary, and Star Wars to thoughtbot. Gabe wrote kumade and can probably tell you how to pronounce it. He’s also a frequent contributor to open source, and has been focusing on shoulda’s matchers lately. For a good time, find Gabe.
Joel just started at thoughtbot after several years as a mercenary. He’s a chatty one, so if you’d like to talk about anything - Ruby, Rails, Sass, beer, dogs, beer for dogs, or the economic viability of dogs as laptop stands - find him. He’s the one with the big head.
Hope to see you there! If not, look for us at one of our other upcoming events.
Posted 27 days back at Ruby5
The Authority Gem, Monitoring Federal Election money, redis_failover, getting rid of bundle exec, redis props, and more in this pre-railsconf ruby5.
Listen to this episode on Ruby5
This episode is sponsored by New Relic
New Relic is throwing a birthday party at RailsConf! Congratulations on your 4th birthday, NewRelic!
Stop by the RailsConf booth to see it in action, and get 30 days of NewRelic free! You can't beat Free! New Relic also rolled out integration with Amazon's new AWS Marketplace this week - if you're using AWK Marketplace to find and host apps for you, you owe it to yourself to get a free NewRelic account and hook it up. You'll be surprised what you learn.
Authority
Nathan Long has published Authority, an authorization library that strives for a no-nonsense API, easily hooking into any mechanism that provides the concept of a current_user.
FECH
Derek Willis from the New York Times wrote in to tell us about FECH, the ruby gem that parses Federal Election Commission electronic campaign filings. The Huffington Post, Thomson Reuters and the Associated Press, among others, have used Fech to help follow the money from political contributions.
redis_failover
Ryan LeCompte wrote in to tell us about his redis_failover gem. redis_failover attempts to provides a full automatic master/slave failover solution for Ruby, and also provides a RedisFailover::Client wrapper that is master/slave aware.
rubygems-bundler
'bundle exec' no more! Install this gem, regenerate your gem binstubs, and you're done!
redis-props
Obie Fernandez released redis-props this week, an extraction from his Due Props startup that gives a DSL for extending the properties of your domain objects into your Redi store.
In our witty banter, we also mention Nate Weiger's redis-objects for comparison.
eloquent explanations
Joe Sak has been writing up summaries of some of the RubyNation talks he attended, and we thought Russ' talk was awesome enough to be a conference keynote.
Prince of Persia
Included in this podcast only as a guilty pleasure, the source code to the original Apple ][ version of Prince of Persia is up on github. Jordan Mechner also has an ebook and some video about the making of the game.
BohConf Pullathon
Monday evening, right after the last RailsConf talk, BohConf will be sponsoring a 'pullathon' - a contest to encourage open source contributions. There will be prizes for the top pull requests generated from the event.
Posted 27 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
Sedef Gavaz discusses the importance of adapting UX techniques used to the target audience, organization and culture, sharing lessons learned while working in China. By Sedef Gavaz
Posted 28 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
John Allspaw discusses pitfalls to be avoided while troubleshooting failed systems, comparing web operations at scale with practices in aviation and nuclear power industries. By John Allspaw
Posted 28 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
Joe Armstrong discusses highly available (HA) systems, introducing different types of HA systems and data, HA architecture and algorithms, 6 rules of HA, and how HA is done with Erlang. By Joe Armstrong
Posted 28 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
InfoQ takes a look back at the life and career of Jack Tramiel, who died on April 8 2012 at the age of 83. As the founder of Commodore Business Machines, Tramiel made a huge contribution to the IT industry, arguably rivalling that of Steve Jobs. By Charles Humble
Posted 29 days back at entp hoth blog - Home
I’ve just added a callback parameter to our autosuggest json endpoint. This means you can now search your knowledge base from anywhere and integrate the results into your page. Furthermore, because it’s using the autosuggest, you can plug in a bunch of unrelated words and it will simply find the best match.
For example, you could parse the contents of your page and automatically suggest the best results for that page from your KB in the sidebar.
Here’s the URL:
http://your.tenderapp.com/search/autosuggest.json?q=query&callback=function
Here’s some sample code to get you started, using a script tag:
<script type="text/javascript">
function kb_search(results){
$('#results').html(results[0].title);
}
</script>
<script src="http://monkeys.tenderapp.com/search/autosuggest.json?callback=kb_search&q=how+do+i+find+api+results" defer="true"></script>
I’ve written a more complex example, that works with a form and a jQuery jsonp call at this gist: feel free to fork it and improve it. It attempts to minimize the number of requests sent.
Posted 29 days back at InfoQ Personalized Feed for unregistered user - Register to upgrade!
Evan Cooke discussing ways of building Simple APIs with fast signup, a clear value proposition, efficient quick start, concise documentation, easy authentication and debuggable. By Evan Cooke