草庐IT

versions

全部标签

ruby-on-rails - Assets 管道损坏 : Not compiling on the fly css and js files

我开始了一个新的Rails3.2.5项目,Assets管道不再工作了。CSS和Javascript文件不再编译。这是尝试生成Assets时日志的输出:StartedGET"/assets/application.css?body=1"for127.0.0.1at2012-06-1623:59:11-0700Servedasset/application.css-200OK(0ms)[2012-06-1623:59:11]ERRORNoMethodError:undefinedmethod`each'fornil:NilClass/Users/greg/.rbenv/versions/1

ruby-on-rails - Spring 不起作用。 [未初始化常量 Spring::SID::DL]

我无法运行Spring。这是错误日志。myid-no-MacBook-Pro:myid$spring/Users/myid/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/spring-0.0.10/lib/spring/sid.rb:17:in`fiddle_func':uninitializedconstantSpring::SID::DL(NameError)from/Users/myid/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/spring-0.0.10/li

ruby-on-rails - 尝试创建新的 Rails 应用程序时出现 Thor 参数错误

我正在尝试使用rails-api创建一个新的应用程序。当我运行rails-apinewmynewapp时,我得到以下信息:/Users/sandy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1.1/lib/thor/parser/option.rb:125:in`validate_default_type!':Anoption'sdefaultmustmatchitstype.(ArgumentError)from/Users/sandy/.rbenv/versions/2.2.2/lib/ruby/gems/2.

ruby-on-rails - ruby - LoadError enc/trans/single_byte

我在我的RubyonRails应用程序中使用ActiveRecord::Store模块时遇到了一个奇怪的问题。据我了解,该模块在后台使用“序列化”方法,因此它只是使用ruby​​内置的psychgem将您的数据序列化为yaml格式。大多数时候它工作正常,但有时我会收到500错误并显示以下消息:LoadError(cannotloadsuchfile--enc/trans/single_byte):~/.rbenv/versions/1.9.3-p286/lib/ruby/1.9.1/psych/visitors/emitter.rb:27:in`write'~/.rbenv/versi

使用时 Rubygems 2.0.14 不是线程安全的 bundle 程序安装消息 - RUBYGEMS VERSION : 2. 4.5.1

运行bundle安装时,我收到以下消息:Rubygems2.0.14isnotthreadsafe,soyourgemswillbeinstalledoneatatime.UpgradetoRubygems2.1.0orhighertoenableparallelgeminstallation.这很奇怪,因为在我的RubyGems环境中它说我的RubyGems版本是:2.4.5.1(见下文)~/w/Rafftopia❯❯❯gemenvRubyGemsEnvironment:-RUBYGEMSVERSION:2.4.5.1-RUBYVERSION:2.2.5(2016-04-26patc

ruby - session 未创建 : Chrome version must be between

当使用ruby​​selenium驱动程序驱动chrome时,我得到/home/travis/.rvm/gems/ruby-2.6.2/gems/selenium-webdriver-3.141.5926/lib/selenium/webdriver/remote/response.rb:72:in`assert_ok':sessionnot创建:Chrome版本必须在70和73之间(Selenium::WebDriver::Error::SessionNotCreatedError)如何解决这个问题?降级chrome不是我想做的事。 最佳答案

ruby - 来自 Bundler 的 Fresh Ruby gem - 无法加载我的 version.rb 文件?

我想制作一个全新的Ruby应用程序,所以我决定使用bundlegemfoo来完成它。这给了我全部:lib/foo/version.rbfoo.rbGemfileRakefilefoo.gemspecREADME.md结构。现在,当我运行rubyfoo.rb时,我得到:`require':cannotloadsuchfile--foo/version(LoadError)foo.rb只是默认值:require'foo/version'moduleFooendgems不能自己跑吗?我希望我不必为了测试而将我的gem包含到示例应用程序中吗? 最佳答案

ruby-on-rails - 有没有办法拥有多个 seeds.rb 文件?任何类型的 'versioning' 用于种子数据?

我们需要为一些新添加的表添加更多种子数据到我们的Rails项目的“版本100”。但是,如果我们简单地将它添加到seeds.rb中并重新运行rakedb:seed命令,它当然会重新添加原始种子数据,复制它。因此,如果您已经将种子数据添加到seeds.rb中,例如,TableOne...我们如何在开发的后期阶段为TableTwo和TableThree增量添加种子数据?我希望我可以简单地创建一个新的seeds_two.rb文件并运行rakedb:seeds_two但这给出了一个错误不知道如何构建任务“db:seeds_two”所以看起来只能使用“seeds.rb”。人们如何维护对种子数据的增

ruby-on-rails - 加载任何 yaml 文件时出现未知别名

当我尝试在我的应用程序中加载任何yaml文件时,出现此错误:Psych::BadAlias:Unknownalias:default/Users/luizkowalski/.rbenv/versions/2.2.3/lib/ruby/2.2.0/psych/visitors/to_ruby.rb:385:in`visit_Psych_Nodes_Alias'/Users/luizkowalski/.rbenv/versions/2.2.3/lib/ruby/2.2.0/psych/visitors/visitor.rb:15:in`visit'/Users/luizkowalski/.

ruby - rbenv:未安装版本 `2.2.3'(由 RBENV_VERSION 环境变量设置)

当我运行部署脚本时,出现错误:[cb123fad]rbenv:version`2.2.3'isnotinstalled(setbyRBENV_VERSIONenvironmentvariable)DEBUG[cb123fad](Backtracerestrictedtoimportedtasks)capaborted!SSHKit::Runner::ExecuteError:Exceptionwhileexecutingasdeploy@xx.xx.xx.xx:Exceptionwhileexecutingasdeploy@xx.xx.xx.xx:bundleexitstatus:1b