What does the ~> symbol mean in a bundler Gemfile? [duplicate]

From the bundler website: The specifier ~> has a special meaning, best shown by example: ‘~> 2.0.3’ is identical to ‘>= 2.0.3‘ and ‘< 2.1.’ ‘~> 2.1’     is identical to ‘>= 2.1’    and ‘< 3.0’. ‘~> 2.2.beta’ will match prerelease versions like ‘2.2.beta.12’. See https://bundler.io/gemfile.html and http://guides.rubygems.org/patterns/#pessimistic-version-constraint

Gem::LoadError for mysql2 gem, but it’s already in Gemfile

If you have this error when upgrading to rails 4.2.4 (also with rails 4.1.5) try using this version of mysql2: gem ‘mysql2’, ‘~> 0.3.18′ Apparently mysql2 isn’t still compatible with newer version of rails because rails 4.2.4 is pretty new as the time of answering this question by me 8 September 2015 so use the … Read more

What is the difference between ~> and >= when specifying rubygem in Gemfile?

That’s a pessimistic version constraint. RubyGems will increment the last digit in the version provided and use that until it reaches a maximum version. So ~>0.8.5 is semantically equivalent to: gem “cucumber”, “>=0.8.5”, “<0.9.0” The easy way to think about it is that you’re okay with the last digit incrementing to some arbitrary value, but … Read more

What is the difference between Gemfile and Gemfile.lock in Ruby on Rails

The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile.lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.lock and install the exact same … Read more

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