Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Do not require faker gem by default

Christophe Bliard1af5d6efafd8
diff --git a/Gemfile b/Gemfile
index f9336de07fa..b06da2eee39 100644
--- a/Gemfile
+++ b/Gemfile
@@ -260,7 +260,7 @@ end
group :development do
gem 'listen', '~> 3.7.0' # Use for event-based reloaders
- gem 'faker'
+ gem 'faker', require: false
gem 'letter_opener'
gem 'spring'
diff --git a/lib/tasks/sample_data.rake b/lib/tasks/sample_data.rake
index 6fd4bfdd2a2..5e4ec671408 100644
--- a/lib/tasks/sample_data.rake
+++ b/lib/tasks/sample_data.rake
@@ -29,6 +29,8 @@
namespace :sample_data do
desc 'Create the given number of fake projects'
task :projects, [:nr_of_projects] => :environment do |_task, args|
+ require 'faker'
+
puts "Creating #{args[:nr_of_projects]} fake projects"
args[:nr_of_projects].to_i.times do |i|