Gemserver as a docker image
I’ve posted before about how to setup a private gemserver using geminabox, but I’ve just released a docker image that does the all the job:
Continue readingI’ve posted before about how to setup a private gemserver using geminabox, but I’ve just released a docker image that does the all the job:
Continue readingIf you think your bundle install takes too long, or have a distributed team around the globe, this may help you.
It’s possible to have a cloudfront server pointing to rubygems, and using it as your gems source server. (If you are not aware of what cloudfront is give a look at it)
On this configuration, cloudfront will fetch requests from rubygems.org, and keep
them cached on the CDN, so you should expect the first bundle install
to take
very close time of using rubygems.org, but the second one and forward should have
some performance increase. You can also manually set the cache time there.
With Bundler/Gemfile it’s easy to link gems directly to it’s git repository. But some times it’s not ideal. Revisions are not versions, and comparing them is tedious.
Luckly It’s easy to setup a private gem server!
Continue readingIt’s possible to use a custom class as a constraint for your routes. For example:
Continue readingI’ve created a simple capistrano task to keep track of my deploys. When I deploy to a server, it will create a git tag and push it to origin. This way I can keep track of each deploy revision.
after 'deploy:update_code', 'git:create_deploy_tag'
namespace :git
task :create_deploy_tag do
puts "[git] creating new deploy tag"
tag_name = "deploy--#{Time.now.strftime("%Y-%m-%d-%H-%M-%S")}"
`git tag -a '#{tag_name}' -m 'Deploy: #{Time.now}' origin/production && git push origin --tags`
end
end
p.s: I use the production
branch as my deploy branch. You can change it for master, or anything else.
This is a simple guide to show how to use the Mobylette gem to make your Rails application respond to mobile and standard devices, and the jquery_mobile_rails gem to make it look awesome while doing that.
The final application’s source is available on Github. It is also running on heroku, if you want to check.
Continue readingI’ve created a very simple gem that includes the jquery mobile files to Rails’ assets pipeline. To install, just add to your Gemfile:
gem 'jquery_mobile_rails'
And require the javascript/css files in your manifests:
//= require jquery.mobile.min
*= require jquery.mobile.min
That’s it. No helpers, no methods, only the files in your application assets pipeline. For more information check the github repo.