[英]Rails gems installed but not functional
I'm using Rails 3.2.13, but I don't know what's wrong with it. 我正在使用Rails 3.2.13,但我不知道它有什么问题。 For some reasons, every gem I tried installing recently were successfully installed (as the log reads 'Your bundle is complete!')
由于某些原因,我最近尝试安装的每个gem都已成功安装(因为日志显示“您的捆绑包已完成!”)
But the problem comes when I tried using the gems, they don't seem to be available! 但是问题出在我尝试使用宝石时,它们似乎不可用!
some of the gems I tried using: - best_in_place - rails-bootstrap-toggle-buttons and other gems as well. 我尝试使用的一些宝石:-best_in_place-rails-bootstrap-toggle-buttons和其他宝石。
None of them worked properly, and for instance, the best_in_place gem gives me the following error 它们都无法正常工作,例如,best_in_place gem给我以下错误
undefined method `best_in_place' for #<#:0x52efc18>
#<#:0x52efc18>的未定义方法`best_in_place'
And in gems where I need to specify 'require [gem_name]', I got errors like 在需要指定'require [gem_name]'的gems中,出现类似
cannot find [gem_name]
找不到[gem_name]
This has been very frustrating to me, please help out, and let me know if there is any more information I should provide. 这让我感到非常沮丧,请帮忙,如果需要提供更多信息,请告诉我。 Thanks!
谢谢!
At the top of your source file you need: 在源文件的顶部,您需要:
require 'name_of_gem'
for each gem you want to use. 对于您要使用的每个宝石。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.