OWASP / railsgoat

A vulnerable version of Rails that follows the OWASP Top 10
railsgoat.cktricky.com
MIT License
858 stars 666 forks source link

Bug: Error running rails db:setup on a fresh install #370

Open joelbrewer opened 4 years ago

joelbrewer commented 4 years ago

Running rails db:setup returns an error.

🐞 Problem

I performed a fresh clone, bundle install, and subsequent rails db:setup and received the following error:

rails aborted! FrozenError: can't modify frozen String: "railties_load_path=" /Users/joelbrewer/Repos/railsgoat/config/application.rb:4:in require' /Users/joelbrewer/Repos/railsgoat/config/application.rb:4:in<top (required)>' /Users/joelbrewer/Repos/railsgoat/Rakefile:5:in require_relative' /Users/joelbrewer/Repos/railsgoat/Rakefile:5:in<top (required)>' script/rails:7:in require' script/rails:7:in

'

Steps to reproduce:

💡 Possible solutions

I have a feeling this could be a ruby/rails version issue (I noticed the Ruby version was recently upgraded).

jasnow commented 4 years ago

What version of ruby are you using?

joelbrewer commented 4 years ago

image

Using rbenv -- this was the only 2.7.0 version available.

jasnow commented 4 years ago

I use rvm with .rvmrc: rvm use 2.7.0-preview1@ruby2.7-rails6.0 --create

joelbrewer commented 4 years ago

Got it - I'll try using rvm 👍

treisland commented 4 years ago

Any update on. This has been a nightmare to install on a fresh ubuntu instance as well as a docker container.

cktricky commented 4 years ago

@treprime are you using RVM as noted above?

treisland commented 4 years ago

@cktricky I managed to get it working on my instance of Ubuntu. Steps below

cktricky commented 4 years ago

Thank you @tre-island. I think I need to try and build this on a fresh ubuntu install to see what we could improve on our end.