dradis / dradis-ce

Dradis Framework: Collaboration and reporting for IT Security teams
https://dradis.com/ce/
GNU General Public License v2.0
673 stars 190 forks source link

Bundler 2.4.22 is running, but your lockfile was generated with 2.3.16. #1206

Closed huornlmj closed 11 months ago

huornlmj commented 11 months ago

Steps to reproduce

I've no idea - I was following the instructions.

Expected behavior

Should work.

Actual behavior

$ ./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
https://github.com/dradis/dradis-html_export.git (at rails-7-upgrade@70ccfe4) is not yet checked out. Run `bundle install` first.
Bundler 2.4.22 is running, but your lockfile was generated with 2.3.16. Installing Bundler 2.3.16 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
There was an error installing the locked bundler version (2.3.16), rerun with the `--verbose` flag for more details. Going on using bundler 2.4.22.
There was an error while trying to write to `/home/user/source/dradis-ce/vendor/bundle/ruby/3.1.0`. It is likely that you need to grant write permissions for that path.

== Command ["bundle install"] failed ==

System configuration

Dradis version: N/A

Ruby version:

$ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]

OS version:

$ cat /etc/issue
Ubuntu 22.04.2 LTS \n \l
MattBudz commented 11 months ago

@huornlmj it looks like you have a newer version of bundler installed. Try running:

$ gem install bundler -v 2.3.16 --verbose

the --verbose flag should give us some more clues as to what the issue is if it errors out.

If bundler installs without errors, then run the setup script again

$ ./bin/setup
huornlmj commented 11 months ago

@MattBudz I tried this and there was no error from your command. But still the setup fails with the following:

$ ./bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
https://github.com/dradis/dradis-html_export.git (at rails-7-upgrade@70ccfe4) is not yet checked out. Run `bundle install` first.
There was an error while trying to write to `/home/user/source/dradis-ce/vendor/bundle/ruby/3.1.0`. It is likely that you need to grant write permissions for that path.

== Command ["bundle install"] failed ==

On closer inspection I see there are some sub dirs that are owned by root and not user for some reason. I've chowned and reset and trying again.

MattBudz commented 11 months ago

@huornlmj looks like we are making some progress now, as this is a different error.

When you run $ bundle install, are you getting any errors?

huornlmj commented 11 months ago

I had to add some additional prerequisites (libpq-dev). THis then worked. But oddly, the README says to point my browser to port 3000 but Dradis is listening on port 8080 instead?

MattBudz commented 11 months ago

the $ ./bin/setup script will start the server on port 8080, but going forward you will start the server using $ bin/rails server and that will run on port 3000. I'll make a note to update the setup script to also use port 3000 for consistency.

huornlmj commented 11 months ago

Ok I see. SO I should ctrl-c the current instance that started on port 8080 via the ./bin/setup and then restart it with ./bin/rails server?

MattBudz commented 11 months ago

yes, $ bin/rails server will get you up and running on port 3000, and you'll be using that command to start the server each time going forward.

I'm closing this issue as it sounds like you're up and running now.