【问题标题】:Fedena Pro 3.0 Rake db:create on ubuntu 14.04 Create ErrorFedena Pro 3.0 Rake db:create on ubuntu 14.04 创建错误
【发布时间】:2015-04-20 07:24:23
【问题描述】:

我正在 Ubuntu 14.04 桌面上安装 Fedena 3.0。当给出这个命令 Rake db:create 我得到以下错误,请帮助。

我在谷歌上搜索了很多解决方案,但没有任何帮助。

我的宝石清单是:

***** 本地宝石 *****

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bundler (1.9.4)
daemons (1.1.9)
declarative_authorization (0.5.1)
diff-lcs (1.2.5)
fastercsv (1.5.5)
hoe (3.13.1)
i18n (0.4.2)
json (1.8.1)
mini_portile (0.6.1)
multi_json (1.10.1)
passenger (5.0.6)
prawn (0.6.3)
prawn-core (0.6.3)
prawn-format (0.2.3)
prawn-layout (0.3.2)
prawn-security (0.1.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rdoc (4.2.0)
rspec (3.2.0)
rspec-core (3.2.3)
rspec-expectations (3.2.1)
rspec-mocks (3.2.1)
rspec-support (3.2.2)
rubygems-bundler (1.1.0)
rubygems-update (1.4.2)
rush (0.6.8)
session (3.2.0)
simpleconsole (0.1.1)
task (0.0.1)
test-unit (1.2.3)

我得到的错误:

# rake db:create --trace
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config.
(in /home/tareen/ansi)
rake aborted!
cannot load such file -- spec/rake/spectask
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/tareen/ansi/lib/tasks/rspec.rake:22:in `<top (required)>'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `block in load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/lib/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_with_new_constant_marking'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `each'
/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/tasks/rails.rb:9:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/tareen/ansi/Rakefile:10:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/var/lib/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'
/usr/local/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/bin/ruby_noexec_wrapper:14:in `<main>'

请帮帮我。

【问题讨论】:

  • 我的错误消失了,现在我将 rspec 降级到 1.2.9,现在我得到以下错误 rake db:create /var/lib/gems/1.9.1/gems/rake-0.8.7/ lib/rake/alt_system.rb:32:使用 RbConfig 而不是过时和不推荐使用的 Config。
  • 试试gem update rake
  • 更新了 rake 但再次出现错误 rake 中止! NoMethodError:未定义的方法name' for "actionmailer":String /var/lib/gems/1.9.1/gems/rails-2.3.5/lib/rails/gem_dependency.rb:268:in =='。 .任务:TOP => db:migrate => 环境(通过使用 --trace 运行任务查看完整跟踪)

标签: ruby-on-rails ubuntu fedena


【解决方案1】:

Fedena 需要 Ruby 1.8.7,特别是。在任何其他版本的 ruby​​ 上安装 Fedena 都会失败。这些是所需的以下软件版本:

  • Ruby 1.8.7
  • Rubygems 1.3.7
  • Rails 2.3.5

您可以使用以下方法来确认版本。对于 Ruby,请运行 ruby -v。对于 Rubygems,运行 gem -v,对于 Rails,您可以使用 rails -v 命令或 gem list | grep rails

您的问题源于 Ruby 1.8.* 已从官方 Ubuntu 14.04 存储库中删除,并且您的 Rails 安装正在下载 1.9.1 作为依赖项。

为了让您更轻松,我邀请您设置一个新服务器并运行 Fedena 2.3 here 的自动安装程序,它将安装所需的基本库,之后您应该安装上面的其他 gem,您的安装应该正常工作。

【讨论】:

  • 感谢亲爱的自动安装程序为 2.3 工作,现在正在尝试 3.0,希望它也能工作。
  • @Naveed 如果 2.3 运行良好,3.0 也可以。您只需要按顺序获取依赖项。祝你好运:)
  • 我在 3.0 中收到没有此类文件的错误 --nokogiri 甚至它在 gem 列表中。 nokogiri 1.6.1
  • 运行gem uninstall nokogiri -Iax 然后gem install nokogiri -v 1.5.10
  • 一个问题解决了另一个提高的耙子中止了! #<:rake::spectask:0x7f996f809340> 的未定义方法“任务”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2013-03-06
  • 1970-01-01
  • 1970-01-01
  • 2012-10-13
  • 2013-02-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多