Error: undefined method `like' for Sequel:Module - ruby

I get this error:
Error: undefined method `like' for Sequel:Module
using:
#info = DB[:info].where(Sequel.like(:content, "%#{params[:sc]}%")) if params[:sc]
I found the example code in Sequel's documentation:
DB[:artists].where(Sequel.like(:name, 'A%'))
What's wrong with my code?

Which version of Sequel are you running? The documentation assumes the latest version, so if you aren't using the latest version, you should upgrade.

Related

xcversion update`: NoMethodError: undefined method `first' for nil:NilClass

When downloading xcode 11 with xcode-install 2.6.1, we get this error
xcversion update: NoMethodError: undefined methodfirst' for nil:NilClass
Its a known issue https://github.com/xcpretty/xcode-install/issues/348
How to fix it?
Works for any ruby version manager (chruby, rvm, rbenv, etc or no version manager)
When you call
xcversion update
Get the path of the failing file -> install.rb
Open it in your editor
Comment line 382
A workaround is to comment out the failing call in install.rb, however its path varies by installation.
Check the output of the xcversion command to find it:
Available session is not valid any more. Continuing with normal login.
/usr/local/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.4/lib/xcode/install.rb:444:in `prereleases': undefined method `first' for nil:NilClass (NoMethodError)
from /usr/local/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.4/lib/xcode/install.rb:379:in `fetch_seedlist'
--> /usr/local/lib/ruby/gems/2.4.0/gems/xcode-install-2.4.4/lib/xcode/install.rb
Open that install.rb in a text editor, go to line #382 which calls the prereleases function and comment it out by changing it to
##xcodes += prereleases.reject { |pre| names.include?(pre.name) }
(Note: this is exactly the same solution as provided by Ted, but without the flashing gifs.)

Odd error when trying to run Tux in Sinatra (error: undefined method `needs_migration?')

I'm trying to run Tux in a Sinatra app, but I keep getting this error:
undefined method `needs_migration?' for ActiveRecord::Migrator:Class
I've tried running bundle update and a lot of other fixes, but nothing is working. Does anyone know what this error means and how to solve it?
I had some left over code in config.ru that I had to remove:
if ActiveRecord::Migrator.needs_migration?
raise 'Migrations are pending. Run `rake db:migrate` to resolve the issue.'
end
Check your project for the this if you're using ActiveRecord > 5.0

b.javascript_dialog().exists? is not working for me in WATIR 4.0.2

When I execute the code
b.javascript_dialog().exists?
it works fine in WATIR 3.0.0 but it's throwing the following error in WATIR 4.0.2, Why it is so? Have they given any other function corresponding to "javascript_dialog()"?
hello.rb:8:in <main>': undefined methodjavascript_dialog' for # (NoMethodError)
From the changelog for v3.1.0:
Remove Browser#(javascript_)dialog. Use Browser#alert API instead.
The javascript_dialog has been replaced by alert:
b.alert.exists?

Error in sql_server package from community opscode

I am tring to install sql server in windows using chef
i found this sql_server
im getting an error
uninitialized constant Chef::Win32::Registry::HKEY_LOCAL_MACHINE
If you are running an older version of Chef client that does not have this constant defined, you will get this error.
See: http://lists.opscode.com/sympa/arc/chef/2014-01/msg00073.html
For me it helped to add :: in front of the constant to break out of any namespace, so it would look like this
::Chef::Win32::Registry::HKEY_LOCAL_MACHINE

Fatal error Call to undefined method VmVendorPDF::convertHTMLColorToDec()

I have updated the latest version of Virtuemart 2.0.24c, once the payment get completed it shows the below error
Fatal error Call to undefined method VmVendorPDF::convertHTMLColorToDec()
I found the solution for the issue, updated the latest version of ext_aio file.
Extract the ext_aio.tar file and then make a zip, after that upgrade the pack, then it is working fine.
Reference Link:
http://forum.virtuemart.net/index.php?topic=119484.0

Resources