Showing posts from January, 2012

Deploying ruby on rails(3.1) app to Heroku and their issues

I am working on a rails 3.1 app and lately was trying to depoy the code in Heroku. Heroku has excellent tutorials for the same, but you can encounter some issues which are out of the scope to predict that, for Heroku  or anyone as it lies with your system. Same was the case with my system. I am trying to enlist such issues...don't give up hope I know there are plethora of others..try googling them or adding them here in the comments :)
Fatal error, port 22 can't connect to the mentioned url: The error is caused as port 22 of your machine is blocked. You maybe behind a firewall or using a secure connection (like vpn) to connect to the network. Please disconnect vpn to connect to heroku or check your firewall settings and even if that doesn't work ask the infrastructure team to unblock the port 22. This may appear while pushing your changes to github repository too.permission-denied-publickey-when-deploying-heroku-code-fatal-the-remote-end:  I found the solution from stack o…

Json, unable to build gem native extension error in windows

I am working in a rails 3.1 app. My Gemfile is not having any json gem version specified, still one of the gem is having a dependency in json, which was resulting in the error above, I have tried

Devkit changing the Rubygems versionusing ruby 1.8.7 and ruby 1.9.2 both, using pik But neither of them worked in windows. Then I started my app in VMware+ubuntu and it worked like miracle. So it's a windows issue try installing ubuntu with a virtual machine in your windows and start a hassle free coding in rails :)

Unpacked vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this

When you have unpacked/localised a gem for an earlier version of rails (before rails 3 and the concept of bundler came in vogue), the specification file under the vendor/gems folder might be missing which gives the error in the title of the post. Don't have to panic, you can easily generate a specification file for the same.
Go to the gem directory under the vendor/gems/ folder
cd vendor/gems/ factory_girl_rails-1.0.1gem specification factory_girl_rails > .specification [Don't specify the gem version while generating the specification file].Or if you have to mention the version use the syntax below gem specification factory_girl_rails -v 1.0.1 > .specification