草庐IT

E_CORE_ERROR

全部标签

ruby-on-rails - rails 4 : Error when installing tiny_tds gem?

我使用Rubyv2和Railsv4开发了一个RailsWeb项目。它在我当前的系统中运行良好,当我尝试在另一台Linux机器(Ubuntu12.4)中运行该项目时,出现Tidy_tds错误。此错误在bundleinstall时显示,错误详情如下Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./home/action/.rvm/rubies/ruby-2.1.1/bin/rubyextconf.rbcheckingforiconv_open()iniconv.h...yescheckingforsybfront.h..

ruby-on-rails - Heroku 和 Rails : Gem Load Error with Postgres, 但它在 GEMFILE 中指定

所以我正在尝试将一个小项目部署到Heroku,但是当我部署它并尝试运行herokurunrakedb:migrate时,它返回了以下错误:rakeaborted!Gem::LoadError:Specified'postgresql'fordatabaseadapter,butthegemisnotloaded.Add`gem'pg'`toyourGemfile(andensureitsversionisattheminimumrequiredbyActiveRecord)./app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.6/li

ruby - 最佳实践 : Using system supplied or custom exceptions for error conditions in ruby?

在ruby​​中编写一个相当简单的命令行工具我需要报告有关命令行参数中的错误的有意义的消息,或者与此相关的程序中的其他错误情况。(未找到输入文件,输入格式无效等)现在我只是在检测参数列表中的错误时用合理的描述引发ArgumentError。这是一种好的做法,还是我也冒着用这种方法隐藏编程错误的风险?换句话说,ruby中系统定义的异常是为应用程序使用而设计的,还是我们应该始终创建自己的异常来报告非系统错误?编辑:例如,如果我使用错误数量的参数调用方法,ruby会引发ArgumentError。这是一个编程错误,我想用堆栈跟踪和所有信息来告知它。然而,当我的程序输入不正确时,我可能想给用户

ruby-on-rails - 无法重新索引 Sunspot SOLR - 错误 - RSolr::Error::Http - 500 内部服务器错误

每次我尝试使用...重建索引rakesunspot:solr:reindex这些错误消息总是显示:Error-RSolr::Error::Http-500InternalServerError-retrying...Error-RSolr::Error::Http-500InternalServerError-ignoring...Error-RSolr::Error::Http-500InternalServerError-retrying...Error-RSolr::Error::Http-500InternalServerError-ignoring...我试着停止然后开始使用

ruby-on-rails - Rails 的 ActiveRecord 序列化 :attr method gives "Missing Class or module error"

我试图在ActiveRecord模型中序列化一个简单的属性,而Rails2.3.4不喜欢它。classShopperserialize:tagsend>>a=Shopper.new=>>>a.tags=['aoeu','stnh']=>['aoeu','snth']>>a.save=>TypeError:classormodulerequired有人知道我错过了什么吗? 最佳答案 Arf...我以为我可以一次序列化两个属性,但事实并非如此:serialize:tags,:garments#thisiswrong第二个参数应该是序列化

ruby - 正则表达式 "empty range in char class error"

我的代码中有一个正则表达式,用于匹配url的模式并抛出错误:/^(http|https):\/\/([\w-]+\.)+[\w-]+([\w-.\/?%&=]*)?$/错误是“字符类错误中的空范围”。我发现原因在([\w-.\/?%&=]*)?部分。Ruby似乎将\w-.中的-识别为范围运算符,而不是文字-。给dash加上escape后问题解决。但原来的正则表达式在我同事的机器上运行良好。我们使用相同版本的osx、rails和ruby:Ruby版本是ruby1.9.3p194,rails是3.1.6,osx是10.7.5。在我们将代码部署到我们的Heroku服务器之后,一切都运行良好。

ruby-on-rails - Rails 无法登录到 postgresql - PG::Error - 密码 - 正确信息

这是我的database.yml文件的样子(显然还有用于测试和生产的相关条目)development:adapter:postgresqlencoding:unicodedatabase:dbname_devpool:5username:usernamepassword:tehpass在终端中,我可以成功运行以下命令并登录到数据库:psql-Uusernamedbname_dev但是在创建这个新的Rails项目并运行之后railsgcontrollerComingSoonindex当我转到localhost:3000/coming_soon时收到以下消息(尽管对登录凭据进行了双重和三次

[ERROR] Error executing Maven.

[ERROR]ErrorexecutingMaven.报错如下:[ERROR]中的关键提示信息:错误分析:解决:报错如下:错误代码提示:[ERROR]ErrorexecutingMaven.[ERROR]2problemswereencounteredwhilebuildingtheeffectivesettings[FATAL]Non-parseablesettingsD:\apache-maven-3.6.2&repository\apache-maven-3.6.2\conf\settings.xml:entityreferencenamecannotcontaincharacter\'

本地nacos启动失败,org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean **

总结:nacos-2.x.x要使用mysql5.7.x项目使用若依3.1.0-cloud版本,因此要使用nacos-2.x.x的版本,下载并安装nacos后,配置application.properties里的ConfigModuleRelatedConfigurations模块,#***************ConfigModuleRelatedConfigurations***************####IfuseMySQLasdatasource: spring.datasource.platform=mysql###CountofDB: db.num=1###ConnectURL

ruby-on-rails - ruby 包安装需要 : no such files to load error

我在通过git克隆的应用程序的bundleinstall安装gems时遇到了麻烦。这是bundleinstall的输出:bundleinstall/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in`require':nosuchfiletoload--rubygems(LoadError)from/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8from/usr/lib/ruby/vendor_ruby/bundler.rb:11:in`require'from/usr/lib