- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我正在尝试使用 postgresql 在我全新的 Rails 项目上执行 rake 命令,但出现此错误:
rake aborted! could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
Tasks: TOP => db:migrate (See full trace by running task with --trace)
real 0m3.245s user 0m1.668s sys 0m0.382s
这是我的第一个 Rails 应用程序,当我运行 rails server
时,这是输出:
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on
http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server [2012-06-19 01:17:30] INFO WEBrick 1.3.1 [2012-06-19 01:17:30] INFO ruby 1.9.3 (2012-04-20)
[x86_64-darwin11.3.0] [2012-06-19 01:17:30] INFO
WEBrick::HTTPServer#start: pid=4668 port=3000
Rails -v: Rails 3.2.3
gem 环境:
RubyGems Environment: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-darwin11.3.0] - INSTALLATION DIRECTORY: /Users/kinhow/.rvm/gems/ruby-1.9.3-p194 - RUBY EXECUTABLE: /Users/kinhow/.rvm/rubies/ruby-1.9.3-p194/bin/ruby - EXECUTABLE DIRECTORY: /Users/kinhow/.rvm/gems/ruby-1.9.3-p194/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-11 - GEM PATHS: - /Users/kinhow/.rvm/gems/ruby-1.9.3-p194 - /Users/kinhow/.rvm/gems/ruby-1.9.3-p194@global - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/
如果有帮助:
运行 psql
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
最佳答案
首先,您需要确保 postgresql 正在运行。打开控制台并执行“ps auxw | grep post”并确保服务器正在运行。您应该至少有四个进程在运行,包括“postgres: writer process”。如果你不这样做,那么你还没有开始。即使您已启动它,您也必须将其配置为监听适当的端口(127.0.0.1 和“localhost”)。您是否编辑了 postgres.conf 文件和 pg_hba.conf 文件?如果你这样做了,你有没有重新启动服务器?您使用的是最新的 pg gem 吗?你如何启动你的服务器?
~查尔斯~
关于ruby-on-rails - Rake 中止,无法连接到 postgresql : connection refused,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11094321/
我已经为精炼厂安装了一个博客引擎,它运行良好。 现在我生成了一些表字段更改的迁移(当然不是精炼厂或博客表),但我收到一个错误: == CreateBlogStructure: migrating ==
设置如下: 新建 Rails 应用程序,然后将此 test_rake.rake 放入 lib/tasks 中: task :testclass do HelloClass.hello end` 将
我觉得调用 bundle exec rake 或 bundle exec make 很奇怪:为什么不呢 bundle exec bundle exec rake 然后呢? 虽然我应该能够从 Rakef
我试图更好地了解 rake作品。我在 rake 网站上查看过它是如何工作的,但没有明确解释 rake搜索 Rakefiles 以及它在解决依赖项时所经历的步骤。有人能解释一下如何rake作品? 最佳答
我有一个构建系统,它由几个带有项目的子目录组成,其中每个子目录都有一个单独的 rakiefile(或几个 rakefiles)。没有顶级目录有一个 rakefile,它遍历所有子目录并通过以下方式调用
我想运行一个要求用户输入的 Rake 任务。 我知道我可以在命令行上提供输入,但我想询问用户是否确定他们想要继续执行特定操作,以防他们错误输入所提供的值之一到 Rake 任务。 最佳答案 像这样的东西
我在 this question 中遇到了相同的 heroku rake 问题(据我所知已解决) . 当我尝试修复(包括 require 'rake/dsl_definition' 上面的 requi
如何编写将捆绑安装然后 rake db:migrate 然后 rake db:seed 的 rake 任务。 namespace 'install' do 'bundle install' '
这可能是一种“插上电源了吗?”问题,但是在获得 Ubuntu 11.04 的默认 Rackspace 镜像之后。运行命令(以 root 身份) apt-get 安装 rake 因错误而失败 Readi
花了一些时间没有在 Rails 上编程,现在我“回来了”,事情出了问题。 我安装了 ruby 1.9.2-p0 并坚持使用 rails 3.0.1.Updated 所有 gems 和 bundle
我在让 dotCover 在 Albacore 中工作时遇到一些问题 exec使用相对路径的任务。 @xUnitRunnerPath = Pathname.new('../../Tools/xUnit
我正在尝试执行“rake db:migrate”,它给了我这个错误。 Andy:AcademyAir Andy$ rake db:migrate /Users/Andy/.rvm/gems/ruby-
我的 .bashrc 中有以下命令: alias mfigpdf='for FIG in *.fig; do fig2dev -L pdftex "$FIG" "${FIG%.*}.pdftex";
我希望能够发出命令 rake test:qunit并运行我们的 qunit 测试。这可能吗?可以在不打开浏览器窗口的情况下完成吗? 最佳答案 您可以将 PhantomJS 集成到 rake 中。 Ph
我不是一个 ruby 人,我正在使用 Ember.js 开发一个项目,我正在使用 Rake 管道来编译我的脚本。 # AssetFile $: true concat 'templates.
嗨,我正在做一些编码并试图 rake routes 这个错误信息出来了,我不知道该怎么办 rake aborted! Gem::LoadError: You have already activate
你好,我正在开发一个 rails 应用程序,每次我尝试运行任何 rake 命令时,我都会收到此错误 /usr/local/bin/rake:22:in load': cannot load such
我打电话 bundle exec cap staging demo:foo . demo:foo Cap 任务调用 Rake 任务,打印出 Rails.env . 但是...... Rails 任务正
相关的 travis-ci 构建位于: http://travis-ci.org/#!/NZOI/nztrain/builds/2046207 此时 db:migrate 或 db:test:prep
为什么我收到这个 Rake 错误: $ rake --version /Volumes/Data/sampablokuper/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/
我是一名优秀的程序员,十分优秀!