Skip to content
Advertisement

Tag: ruby-on-rails

bundle install not running from my post-update hook

I’ve setup a post-update hook for my project. I have a bare repository (/var/git/myproject) which I push to, and a live repository (/var/www/myproject) where my app is running. I also included bundle install and bundle exec rake db:migrate to install gems and update db. Below is my post-update hook When I push my changes though I get the following message

Rails: Uninstall specific version of a library using gem

For example I have the following four versions installed: capybara (2.2.1, 2.2.0.rc1, 2.1.0, 1.1.4) Please suggest how to uninstall the capybara version 1.1.4 Answer When you do gem uninstall capybara it should give you a menu asking which one you want to uninstall. Alternatively use the -v option. Note you may need to sudo these commands if you’re not using

Rails sends 0 byte files using send_file

I can’t get send_file(Model.attachment.path) to work. It doesn’t fail, instead, it sends a 0 byte size file to the client, the file names are correct though. This problem started happening after I did a big migration from Rails 2.3.8 to 3. There were a lot of other things that took place in this migration and I will try my best

Advertisement