# Wrong number of arguments (given 2, expected 1)

**URL:** <https://talk.jekyllrb.com/t/wrong-number-of-arguments-given-2-expected-1/5446>\
**Category:** Help\
**Created:** [January 2, 2021, 7:23pm UTC](https://talk.jekyllrb.com/t/wrong-number-of-arguments-given-2-expected-1/5446 "2021-01-02T19:23:59Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![AlfredoRamos](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/alfredoramos/32/3815_2.png) [@AlfredoRamos](https://talk.jekyllrb.com/u/AlfredoRamos)\
**Post date:** [January 3, 2021, 6:50am UTC](https://talk.jekyllrb.com/t/wrong-number-of-arguments-given-2-expected-1/5446/15 "2021-01-03T06:50:27Z")

</div>

> [@yuriy-j](#):
>
> bundle exec jekyll s – worked!
> 
> But how to fix the errors to just run jekyll s?

Prefixing your commands `bundle exec` will help you to solve issues when having multiple versions of the same gems, since nothing stops you to do that.

However if you still want to run just `jekyll s` you can set a [pessimistic version constraint](https://guides.rubygems.org/patterns/#pessimistic-version-constraint) in your `Gemfile`, like:

```ruby
gem 'jekyll', '~> 3.9'

```

Update your dependencies

```shell
bundle update

```

And then clean all the gems not declared in your `Gemfile`

```shell
bundle clean

```

> ⚠ Be aware that after running `bundle clean` you might need to run `bundle install` again on other Ruby projects, to reinstall the required gems. ⚠

[https://bundler.io/v2.2/man/bundle-clean.1.html](https://bundler.io/v2.2/man/bundle-clean.1.html)

---

_[View the full topic](https://talk.jekyllrb.com/t/wrong-number-of-arguments-given-2-expected-1/5446)._
