草庐IT

mysql_install_db

全部标签

ruby-on-rails - 当您的 Gemfile 需要旧版本的 bundler 时如何将其设置为 `bundle install`?

我在一个有Gemfile的旧Rails项目中。我试图将gem添加到Gemfile和bundleinstall但出现错误:Bundlercouldnotfindcompatibleversionsforgem"bundler":InGemfile:rails(=3.0.0)rubydependsonbundler(~>1.0.0)rubyCurrentBundlerversion:bundler(1.1.5)ThisGemfilerequiresadifferentversionofBundler.它使用的Rails版本需要bundler~>1.0.0但我已经安装了1.1.5并且正在将它

ruby-on-rails - 为什么 Bundle Install 在 vendor/bundle 中安装 gem?

每当我执行bundleinstall时,所有的gem都会安装在app_dir/vendor/bundle路径并消耗大量磁盘空间。我还尝试在应该安装的地方安装gem,即gemsets,同时通过以下方式进行开发:bundleinstall--no-deployement但这对我不起作用,无法在vendor/bundle上安装gems。我怎样才能让它为所有应用程序全局安装或安装在ruby​​gemsets位置?我也尝试删除.bundle/config但没有任何改变。我正在使用:rvmversion:1.23.14rubyversion:2.0.0-p247rails3.2.13这是我的~/.

ruby - rbenv install --list 不列出版本 2.1.2

我在OSX10.9.3MacBookPro上通过Homebrew安装了rbenv:brewupdatebrewupgraderbenvruby-build根据rbenvinstall--list在我的笔记本电脑上Ruby2.1.0-dev是最新的。 最佳答案 rbenv和ruby-build一般都是从Github克隆安装的;就是这样theauthorsrecommendweinstallit.gitclonehttps://github.com/sstephenson/rbenv.git~/.rbenvgitclonehttps:/

ruby-on-rails - 如何处理 Ruby on Rails 错误 : "Please install the postgresql adapter: ` gem install activerecord-postgresql-adapter'"

运行RubyonRails(RoR)应用程序或使用ActiveRecord框架的Ruby代码,您会收到错误消息:Pleaseinstallthepostgresqladapter:geminstallactiverecord-postgresql-adapter尝试运行:geminstallactiverecord-postgresql-adapter也失败了,让你不知所措。 最佳答案 问题不是任何人写的。问题是postgresql数据库适配器的名称是“postgresql”,而不是“postgres”,尽管GEM的名称是“pg”。

ruby - `gem install therubyracer` 在 Mac OS X Lion 上失败

我将不胜感激让geminstalltherubyracer正常工作。这是错误:$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./Users/david/.rvm/rubies/ruby-1.9.3-p194/bin/rubyextconf.rbcheckingformain()in-lobjc...yes***extconf.rbfailed***Cou

ruby-on-rails - 为什么 rake db :migrate:reset not listed in rake -T?

为什么rake-T没有列出一些rake任务?像db:migrate:reset吗?我可以毫无问题地执行它,但为什么它没有列在那里?有没有办法获得真正完整的rake任务列表?%rake-T(in/home/zeus/projects/my_project)rakeabout#ListversionsofallRailsframeworksandtheenvironmentrakedb:create#Createthedatabasefromconfig/database.ymlforthecurrentRails.env(usedb:create:alltocreatealldbsint

MySQL REPLACE字符串函数简介

MySQL为您提供了一个有用的字符串函数REPLACE(),它允许您用新的字符串替换表的列中的字符串。REPLACE()函数的语法如下:REPLACE(str,old_string,new_string);SQLREPLACE()函数有三个参数,它将string中的old_string替换为new_string字符串。注意:有一个也叫作REPLACE的语句用于插入或更新数据。所以不要将REPLACE语句与这里的REPLACE字符串函数混淆。REPLACE()函数非常方便搜索和替换表中的文本,例如更新过时的URL,纠正拼写错误等。在UPDATE语句中使用REPLACE函数的语法如下:UPDATE

ruby - 如何解决 "You need to have Ruby and Sass installed and in your PATH for this task to work"警告?

我正在为工作设置一台新Mac。我已经在全局范围内安装了Grunt&GruntCLI。然后我在项目文件夹中执行了npminstall以安装所有依赖项。到目前为止没有问题,但是当我尝试运行sass:dist任务时,我收到了这个警告:Warning:YouneedtohaveRubyandSassinstalledandinyourPATHforthistasktowork.Moreinfo:https://github.com/gruntjs/grunt-contrib-sassUse--forcetocontinue.据我了解,我需要在更全局的级别上安装Ruby和Sass才能运行此任务。

ruby-on-rails - 错误 : Error installing capybara-webkit:

关于如何修复有什么建议吗?geminstallcapybara-webkit-v'0.11.0'Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingcapybara-webkit:ERROR:Failedtobuildgemnativeextension./home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/rubyextconf.rbsh:qmake:notfoundGemfileswillremaininstalledin/home/durrantm/.rvm

ruby-on-rails - 什么是 rake db :test:prepare actually do?

我正在观看Rails教程视频,但我无法弄清楚db:test:prepare命令的实际作用。有人可以提供解释吗? 最佳答案 Therakedb:migrateaboverunsanypendingmigrationsonthedevelopmentenvironmentandupdatesdb/schema.rb.Therakedb:test:loadrecreatesthetestdatabasefromthecurrentdb/schema.rb.Onsubsequentattempts,itisagoodideatofirstr