How to solve the update bundler warning in rails when deploying to heroku?

So it’s complaining that the version of bundler installed on heroku is older than the version you used to create your Gemfile.lock on your dev machine. You can probably just ignore the warning — in most cases installing with a slightly older version of bundler than you used to create the Gemfile.lock is just fine. … Read more

How to use Bundler with offline .gem file?

I’m using Rails 3.0.3, new to Rails 3 and bundler. I got this same error with: gem ‘mygem’, :path => ‘/path/to/gem’ Resolved by specifying the version number: gem ‘mygem’, ‘0.0.1’, :path => ‘/path/to/gem’ Using >=0.0.1 for the version reverted to the original error. I can’t explain any of this, however. Quoting JD’s helpful commment, from … Read more

How to create a new Ruby gem?

Use Bundler From the command line: bundle gem your_new_gem This will create a directory called your_new_gem with just a basic set of files and directory structure that are now considered best-practice. It’s quick, easy, and a great place to start.

Rails: Your user account isn’t allowed to install to the system RubyGems

In my case, I solved doing just what the error message suggests: Your user account isn’t allowed to install to the system RubyGems. You can cancel this installation and run: bundle install –path vendor/bundle to install the gems into ./vendor/bundle/ So, instead of: bundle install I ran: bundle install –path vendor/bundle That was the solution … Read more

Gemfile.lock write error, permissions?

Your app root directory (whose permissions govern file creation) and files are all owned by root instead of your user (possibly because you did sudo rails new—don’t use sudo for that). You can change the permissions by doing: sudo chown -R $(whoami):$(whoami) myappfolder Where “myappfolder” is your Rails app’s root directory. By the way, a … Read more

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