无法找到本地gem组件的组件

时间:2015-08-12 19:49:11

标签: voltrb

我正在制作名为volt-date_time_picker的伏特组件。当我使用简单应用程序中的组件时,我收到此错误:

RuntimeError at /
Unable to find component 'font_awesome', make sure the gem is included in your Gemfile

这是Gemfile:

source 'https://rubygems.org'

gem 'volt-font_awesome'

# Specify your gem's dependencies in volt-date_time_picker.gemspec
gemspec

这是我的dependencies.rb:

# Component dependencies

component 'font_awesome'

我有一个使用此组件的简单应用程序,这是在我的Gemfile中:

gem 'volt-date_time_picker', '0.1.0', :path => '/home/miguel/development/ruby/lib/volt-date_time_picker'

这是我的dependencies.rb:

component 'date_time_picker'

(注意:如果我在应用程序的Gemfile中包含gem font_awesome,那么它可以工作。)

1 个答案:

答案 0 :(得分:0)

文件gemspec中的这一行解决了这个问题:

spec.add_dependency "volt-font_awesome"

Gemfile应该是这样的:

source 'https://rubygems.org'

# Specify your gem's dependencies in volt-date_time_picker.gemspec
gemspec