ruby-1.9.2

    1热度

    1回答

    *在继续学习之前,我将更好地学习Rails 3.1。感谢您的帮助,每个人:我学到了很多东西! * 我想创建一个基于Gullery的在线投资组合,但我一开始就陷入了困境:我无法创建数据库。当我运行“耙分贝:创建”,我得到以下错误: rake aborted! C:\Sites\gullery/RakeFile:14: syntax error, unexpected $end, expecting

    1热度

    1回答

    我有一个疑问, 我可以使用此命令 gem unpack therubyracer-0.9.9.gem 我越来越therubyracer解压宝石“herubyracer-0.9.9.gem” -0.9.9文件夹 Changelog.md的Gemfile README.md Rake文件斌/转/ lib中/规格/ specmem/specthread/therubyracer.gemspec 和我

    1热度

    1回答

    目前使用红宝石1.8.7-P302 [I386] 移动红宝石红宝石1.9.2-P0 [I386] 运行轨3.0.0 得到了升级后出现以下错误: # RAILS_ENV=production rails s => Booting WEBrick => Rails 3.0.0 application starting in production on http://0.0.0.0:3000 =>

    1热度

    1回答

    Ruby的super关键字的规则是,如果不带参数调用它,所有原始参数都会被转发。如果使用明确的参数调用明确的参数,则只传入明确的参数。 在此示例中,参数不应该被转发,因为我使用确切参数调用super。 例子: @doc = Nokogiri::HTML::DocumentFragment.parse("<body></body>") class Cat < Nokogiri::XML::Nod

    2热度

    3回答

    考虑下面的代码: class ArrayProxy < BasicObject def initialize @array = [] end def foo puts 'foo' end def method_missing(*args, &block) @array = @array.send(*args, &b

    0热度

    2回答

    在Settingslogic fork允许数组作为源,在红宝石1.8.7一切正常,但在红宝石1.9.2有一个错误。问题是这部分代码中: self.class.class_eval <<-EndEval def #{key} return @#{key} if @#{key} raise MissingSetting, "Missing setting '#{key}'

    3热度

    3回答

    a = [2,4,5] a.count-1 => 2 a.count - 1 => 2 但 a.count -1 => 0 是什么原因导致这种行为?如果a是整数(而不是数组),为什么不会发生? 此外,我注意到方法名称和后面的括号(对于参数)之间不能有空格。这是为什么? 红宝石1.9.2

    3热度

    3回答

    所以我的代码在ruby 1.8.7上运行的很好,但在1.9.2上它不起作用。 这里的错误消息: rake aborted! /u/apps/proxy/releases/20111115125519/db/seeds.rb:16: syntax error, unexpected tASSOC, expecting ')' :image_url => 'dooropen',

    1热度

    2回答

    运行下面的命令时,我得到这个错误: $ rvm upgrade 1.9.2-p180 1.9.3-p0 Are you sure you wish to upgrade from ruby-1.9.2-p180 to ruby-1.9.3-p0? (Y/n): Y Installing new ruby ruby-1.9.3-p0 Installing Ruby from source t

    10热度

    1回答

    我有一个称为类别和其他模型产品的模型。他们有has_many和belongs_to关系。 但在我看来 <p><%= f.collection_select(:product, :category_id, Category.all, :id, :name)%> 代码是给我 undefined method `merge' for :name:Symbol 任何线索有什么错呢?