Ruby Geolocation Gem/Plugins [closed]

Your current best bet is probably GeoKit (http://github.com/andre/geokit-gem for gem, http://github.com/andre/geokit-rails for plugin). It has built in functionality for Yahoo and Google API keys, distance calculation helpers, reverse geolocation, etc. However, GeoMereLaal (http://github.com/parolkar/geo_mere_laal/) is based on the working draft of the W3C Geolocaton API. It’s very limited at the moment as I could only get … Read more

You don’t have [PATH ]in your PATH, gem executables will not run.” while using “gem install –user-install bundler

For those who have problems with @lamech-desai answer, (actually, when they do Desai’s commands, it apparently works temporarily for them). So you can easily do these: open ~/.bashrc if you would like to use bash or ~/.zshrc if your are using zsh or etc… $ nano .bashrc ## bash users $ nano .zshrc ## zsh … Read more

How to tell gem command not to use SSL

Use HTTP instead of HTTPS if you are unable to solve the certs issue: $ gem install rails –source http://rubygems.org To avoid repeating this every time, either edit your ~/.gemrc or edit the file through the command line, like this: $ gem sources –add http://rubygems.org $ gem sources –remove https://rubygems.org $ gem sources –list *** … Read more

Understanding Gemfile.lock: Is it okay to delete Gemfile.lock then run bundle install again?

You’re probably not going to ruin your dev environment. However, you might end up with newer versions of gems than you had before. It depends on how you have defined them in Gemfile. If you’re using entries like: gem “rails” Then you’ll get the latest rails gem, whatever that might be. If you’re using entries … Read more

Is it advisable to include the contents of vendor/cache in Git in a Rails 3.2 application?

TL;DR: This is up to you, but I recommend keeping them in git. What vendor/cache does is allow bundling, especially deployment bundling to skip downloading the gems from rubygems. This significantly reduces reliance on rubygems. In deployment, you can specify –local to bundler to completely remove all dependence on rubygems.org, but only if these files … Read more

Gem update: unable to convert “\xE7” to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII

I have had a similar issue on my Mac OS X using iTerm2 instead of the default OS X Terminal.app. The LC_CTYPE is not set properly by iTerm2, once I have added export LC_CTYPE=”utf-8″ to ~/.bash_profile the gem installation goes smoothly. note: of course you can add the export to any of the other profile … Read more

PG::InvalidParameterValue: ERROR: invalid value for parameter “client_min_messages”: “panic”

To make it work with PostgreSQL version 12, I monkey patched PostgreSQLAdapter class to replace ‘panic’ with ‘warning’ message. Note, if you can upgrade activerecord gem to 4.2.6 or higher versions you don’t need to have this monkey patch. I had to do this because my project depends on gem activerecord-3.2.22.5 require ‘active_record/connection_adapters/postgresql_adapter’ class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)