warning: constant ::Fixnum is deprecated When generating new model

This warnings appear because you are using ruby 2.4.0. This version introduced this change: Unify Fixnum and Bignum into Integer See here for the announcement: https://www.ruby-lang.org/en/news/2016/12/25/ruby-2-4-0-released/ The warnings come from the activesupport gem which is part of rails and will be fixed in an upcoming release. For now you can just ignore those warnings. Update: … Read more

The “:nothing” option is deprecated and will be removed in Rails 5.1

According to the rails source, this is done under the hood when passing nothing: true in rails 5. if options.delete(:nothing) ActiveSupport::Deprecation.warn(“`:nothing` option is deprecated and will be removed in Rails 5.1. Use `head` method to respond with empty response body.”) options[:body] = nil end Just replacing nothing: true with body: nil should therefore solve the … Read more

Bundler: You must use Bundler 2 or greater with this lockfile

I had a similar experience. Here’s how I solved it Display a list of all your local gems for the bundler gem gem list bundler N/B: The command above is for rbenv version manager, the one for rvm might be different This will display the versions of the bundler gem installed locally bundler (2.1.4, default: … Read more

Rails – How to use a Helper Inside a Controller

You can use helpers.<helper> in Rails 5+ (or ActionController::Base.helpers.<helper>) view_context.<helper> (Rails 4 & 3) (WARNING: this instantiates a new view instance per call) @template.<helper> (Rails 2) include helper in a singleton class and then singleton.helper include the helper in the controller (WARNING: will make all helper methods into controller actions)

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