./bin/setup fails

I try to upgrade Bundle and Ruby to a newer version and no luck. Please let me know if you need more info:

== Enabling default add-ons ==
== Installing dependencies ==

[!] There was an error parsing `Gemfile`: undefined method `exists?' for class File. Bundler cannot continue.                                             
                                                                             
 #  from /dradis-ce/Gemfile:227                                              
 #  -------------------------------------------                              
 #  plugins_file = 'Gemfile.plugins'                                         
 >  if File.exists?(plugins_file)                                            
 #    eval(IO.read(plugins_file), binding)                                   
 #  -------------------------------------------                              
                                                                             
[!] There was an error parsing `Gemfile`: undefined method `exists?' for class File. Bundler cannot continue.                                             
                                                                             
 #  from /dradis-ce/Gemfile:227                                              
 #  -------------------------------------------                              
 #  plugins_file = 'Gemfile.plugins'                                         
 >  if File.exists?(plugins_file)                                            
 #    eval(IO.read(plugins_file), binding)                                   
 #  -------------------------------------------                              
                                                                             
== Command ["bundle install"] failed ==

:waving_hand: @cdog,

  1. where did you get your Dradis CE code from? Stright from git pull or from a distro (e.g. Kali) or somewhere else?

I just run git clone and it seems the current code on develop with Ruby 3.1.2 (from .ruby-version), has no issues w/ ./bin/setup or ./bin/bundle.

  1. What version of Ruby are you on? (ruby -v)

  2. What version of Dradis? (git log | head -1)

Apologies for replying so late. My tub was flooding so I was a plumber for a day.

I got the code from the Dradis site.

──(kali㉿kali)-[~]
└─$ ruby -v
ruby 3.3.8 (2025-04-09 revision b200bad6cd) [x86_64-linux-gnu]

┌──(kali㉿kali)-[~]
└─$ git log | head -1
fatal: not a git repository (or any of the parent directories): .git

┌──(kali㉿kali)-[~]
└─$

Perfect, can I then ask you to follow the steps in:

And report back?

I see the Ruby version is not quite right and that you’re running the git command from outside the dradis-ce/ folder. Hopefully the guide has all the steps you need to get you up and running.

In a nutshell:

I am receiving the same errors. I did try to run the ./bin/setup with lower perms but the issue persists.
I tried to upload screenshots but my user account does not have those privileges.

┌──(root㉿kali)-[/home/kali/dradis-ce/dradis-ce]
└─# git log | head -1
commit 0a4b0404ba0cab5ab338312ca8ef0f8c9a40e773

@cdog can you try uploading screenshots again? I just bumped up your privileges and you should be able to now!

1 Like


…also, please note, I am running Kali on Virtual Box. It shouldn’t make a difference but wanted to give the full 360.

@cdog could you run the following and send over the output? This appears to be due to running ruby > 3.2 where Dradis is expecting ruby 3.1.2.

rvm list

If ruby-3.1.2 is listed in the output:

rvm use 3.1.2

If ruby-3.1.2 is not listed in the output:

rvm install 3.1.2
rvm use 3.1.2

I had to use rbenv. Ruby 3.1.2 is default. Should I start right from the command that was giving me issues (./bin/setup) or start from the beginning?’

Please see the screenshot:
3.1.2

Hi cdog,

I try to upgrade Bundle and Ruby to a newer version and no luck.

When you say you tried to upgrade Ruby, what version were you trying to upgrade to?

File.exists? was deprecated in Ruby version 3.2 so that would explain the error you’re seeing. If you run Dradis with Ruby v3.1.2 this error should resolve itself.

Can you restart your VM and confirm that the correct ruby version is being used by your instance?