diff --git a/cli/lib/twenty/cli/command/connect.rb b/cli/lib/twenty/cli/command/connect.rb index 90d882c..ede188e 100644 --- a/cli/lib/twenty/cli/command/connect.rb +++ b/cli/lib/twenty/cli/command/connect.rb @@ -21,6 +21,7 @@ class Twenty::Command::Connect < Twenty::Command private def run_command(options) + require "twenty/server/model" path = File.realpath(options.path ? options.path : Dir.getwd) if File.exist?(path) project = Twenty::Project.create( diff --git a/cli/lib/twenty/cli/command/console.rb b/cli/lib/twenty/cli/command/console.rb index d1cdb10..e6e0189 100644 --- a/cli/lib/twenty/cli/command/console.rb +++ b/cli/lib/twenty/cli/command/console.rb @@ -24,6 +24,7 @@ class Twenty::Command::Console < Twenty::Command private def run_command(options) + require "twenty/server/model" require "irb" TOPLEVEL_BINDING.irb end diff --git a/cli/lib/twenty/cli/command/disconnect.rb b/cli/lib/twenty/cli/command/disconnect.rb index b0a0bef..1aa2084 100644 --- a/cli/lib/twenty/cli/command/disconnect.rb +++ b/cli/lib/twenty/cli/command/disconnect.rb @@ -19,6 +19,7 @@ class Twenty::Command::Disconnect < Twenty::Command private def run_command(options) + require "twenty/server/model" path = File.realpath(options.path ? options.path : Dir.getwd) Twenty::Project .where(path:) diff --git a/cli/lib/twenty/cli/command/up.rb b/cli/lib/twenty/cli/command/up.rb index 87214a2..3144835 100644 --- a/cli/lib/twenty/cli/command/up.rb +++ b/cli/lib/twenty/cli/command/up.rb @@ -36,6 +36,7 @@ class Twenty::Command::Up < Twenty::Command private def run_command(options) + require "twenty/server/model" File.binwrite(pid, Process.pid.to_s) thr = Twenty::Rack.server(options).start thr.join