Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch fails with "undefined method `new' for BigDecimal:Class" #152

Open
martinstut opened this issue May 17, 2021 · 5 comments
Open

Launch fails with "undefined method `new' for BigDecimal:Class" #152

martinstut opened this issue May 17, 2021 · 5 comments

Comments

@martinstut
Copy link

When I try launching task-web after a fresh install, I get this error message:

martin@ubumartin16:~$ task-web
Traceback (most recent call last):
	17: from /usr/local/bin/task-web:23:in `<main>'
	16: from /usr/local/bin/task-web:23:in `load'
	15: from /var/lib/gems/2.7.0/gems/taskwarrior-web-1.1.12/bin/task-web:6:in `<top (required)>'
	14: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	13: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
	12: from /var/lib/gems/2.7.0/gems/taskwarrior-web-1.1.12/lib/taskwarrior-web.rb:5:in `<top (required)>'
	11: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	10: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 9: from /var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext.rb:1:in `<top (required)>'
	 8: from /var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext.rb:1:in `each'
	 7: from /var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
	 6: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 5: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 4: from /var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext/object.rb:3:in `<top (required)>'
	 3: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 2: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	 1: from /var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext/object/duplicable.rb:109:in `<top (required)>'
/var/lib/gems/2.7.0/gems/activesupport-3.2.22.5/lib/active_support/core_ext/object/duplicable.rb:111:in `<class:BigDecimal>': undefined method `new' for BigDecimal:Class (NoMethodError)

OS is Ubuntu Mate 20.04 LTS with current updates. Ruby version 2.7, gem update has updated everything fine.

Output of task _version:
2.5.1

Output of gem list bigdecimal :

*** LOCAL GEMS ***
bigdecimal (3.0.2, default: 2.0.0)

Output of gem list activesupport

*** LOCAL GEMS ***
activesupport (6.1.3.2, 5.2.3, 3.2.22.5)

Searching the web turns out many people have issues with Ruby 2.7 and bigdecimal.

How can I launch task-web without downgrading the my entire Ruby environment?

@paultheastronomer
Copy link

I have the same problem. Any solution?

@ronstone2000
Copy link

Same issue here with 2.6. I don't see much activity, perhaps task warrior-web is no longer supported?

@klaygomes
Copy link

Including:

gem 'bigdecimal', '1.3.0'

On my Gemfile fixed the problem.

@Danieliv
Copy link

Danieliv commented Jul 8, 2022

Including:

gem 'bigdecimal', '1.3.0'

On my Gemfile fixed the problem.

Thanks. I spent like 4 hours until I found this and it works perfectly. 👍

@BlueNalgene
Copy link

Including:

gem 'bigdecimal', '1.3.0'

On my Gemfile fixed the problem.

This did not work for me on Kubuntu 22.04 with ruby 3.0.2p107, but it gave me the hint I needed. I needed to add

s.add_dependency('bigdecimal', '1.3.0')

to taskwarrior-web.gemspec instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants