ruby-1.9.2

    1热度

    1回答

    我的heroku部署崩溃,出现以下错误。 2012-12-12T17:16:18+00:00 app[web.1]: bash: bundle: command not found 2012-12-12T17:16:19+00:00 heroku[web.1]: Process exited with status 127 2012-12-12T17:16:19+00:00 heroku[we

    0热度

    2回答

    我使用Ruby 1.9.2 string = "asufasu isaubfusabiu safbsua fbisaufb sa {{hello}} uasdhfa s asuibfisubibas {{manish}} erieroi" 现在,我必须找到{{anyword}} 多少次它会和名称与大括号。 阅读Regexp 后我使用 /{{[a-z]}}/.match(string) 但它

    12热度

    4回答

    当我尝试启动我的Rails的服务器,我收到以下错误: 我使用Ruby 1.9.2 => Booting WEBrick => Rails 3.1.8 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server /Users/

    1热度

    1回答

    回形针在Heroku中生成错误的URL。 我有一个音频模式具有MP3领域如下: class Audio < ActiveRecord::Base has_attached_file :mp3, :storage => :s3, :s3_credentials => S3_CREDENTIALS, :bucket => S3_CREDENTIALS[:buck

    1热度

    1回答

    我有一个像下面 "\"123\",\"Columbia, Gem Of The Ocean\"" 我想把它转换成数组一个字符串,我应该得到像下面 ["123","Columbia, Gem Of The Ocean"] 但是,当我用逗号方法对字符串分割我得到一个输出像下面 ["\"123\"", "\"Columbia", " Gem Of The Ocean\""] 这是分裂“哥,创

    3热度

    1回答

    我从以下C#加密码开始,并且想用Ruby解密。我的问题是我不知道如何在Ruby/OpenSSL中设置填充模式。我特别需要使用PKCS7。 C#加密 System.Security.Cryptography.Aes c = new System.Security.Cryptography.AesManaged(); c.Mode = CipherMode.CBC; c.Padding = Pad

    3热度

    1回答

    我在使用Ruby 1.8.6(MRI)的Rails 2.2.2版本中有一个现有的rails应用程序。 任何人都可以请让我知道,如何使用Ruby 1.9.2运行应用程序。因为,我必须在Ruby 1.9.2(MRI)版本上运行该应用程序。 在此先感谢。 Ratnakar M.

    21热度

    1回答

    格式化的整数填充零容易在Ruby中: sprintf("%010d", 345) #=> "0000000345" 但是当我尝试以填补零的字符串我无法找到一个简单的解决方案: sprintf("%010d", "12AD") #=> ArgumentError: invalid value for Integer(): "12AD" sprintf("%010s", "12AD") #=>

    0热度

    1回答

    我试图安装OJ红宝石宝石 gem install oj -v '1.3.5' 下面是输出日志 C:/Ruby192/bin/ruby.exe extconf.rb 红宝石版本创建的Makefile 1.9.2 < < < < < 创建的Makefile make C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_oj'" > oj-i386-

    0热度

    1回答

    我碰到了奇怪使用散列作为类变量的问题。运行以下代码后,我期望类变量@@class_hash应包含{:one => {'a' => 'one'}, :two => {'a' => 'two'}}。 但是,我运行此代码后,@@class_hash是{:one => {'a' => 'two'}, :two => {'a' => 'two'}}。 这是为什么? class Klass @@cl