gpt4 book ai didi

ruby - Capifony 数据库函数失败并显示 `require' : cannot load such file -- FileUtils (LoadError)

转载 作者:数据小太阳 更新时间:2023-10-29 07:21:27 26 4
gpt4 key购买 nike

当我调用任何 Capifony 数据库函数时,例如 cap database:move:to_remote,我收到以下 ruby​​ 错误:

jeremykendall@isr-thinkpad-420s:~/dev/sites/app$ cap develop database:move:to_remote
triggering load callbacks
* executing `develop'
triggering start callbacks for `database:move:to_remote'
* executing `multistage:ensure'
* executing `database:move:to_remote'
* executing `database:dump:local'
/home/jeremykendall/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- FileUtils (LoadError)
from /home/jeremykendall/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capifony-2.1.5/lib/symfony2.rb:101:in `block (3 levels) in load'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capifony-2.1.5/lib/symfony2.rb:159:in `block (3 levels) in load'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:45:in `each'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:34:in `execute!'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:14:in `execute'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/gems/capistrano-2.11.2/bin/cap:4:in `<top (required)>'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/bin/cap:19:in `load'
from /home/jeremykendall/.rvm/gems/ruby-1.9.3-p125@interperf/bin/cap:19:in `<main>'

我的部署.rb:

set :stage_dir,       'app/config/deploy'
require 'capistrano/ext/multistage'
set :stages, %w{production testing develop}

default_run_options[:pty] = true

set :application, "appname"
set :deploy_to, "/home/isr/sites/app"
set :deploy_via, :remote_cache

set :scm, :git
set :repository, "git@github.com:jeremykendall/redacted.git"
set :user, "isr"
set :use_sudo, false

ssh_options[:forward_agent] = true

set :model_manager, "doctrine"
set :keep_releases, 3
set :update_vendors, true
set :shared_files, ["app/config/parameters.yml", "app/config/parameters.ini"]
set :shared_children, [app_path + "/logs", app_path + "/cache", web_path + "/uploads", "vendor"]

我的app/config/deploy/develop.rb

# Deploys to local vagrant box

set :domain, "192.168.33.10"
set :symfony_env_prod, "dev"
set :deploy_to, "/home/vagrant/sites/app"
set :branch, "develop"
set :user, "vagrant"

role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run

我尝试过的

  • gem 安装 fileutils
  • sudo aptitude install libfileutils-ocaml-dev(捕获 FileUtils 吸管)
  • gem update --system
  • gem 更新

最佳答案

看起来是 a bug in capifony 2.1.5 .尝试 grepping require "FileUtils" 并替换为 require "fileutils"。那还是等待补丁?

关于ruby - Capifony 数据库函数失败并显示 `require' : cannot load such file -- FileUtils (LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10108485/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com