- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用的是 Rails 4.0.0,昨天使用 mysql-connector-c-6.1.3.winx64 成功安装了 mysql2 gem (mysql-0.3.15)。我使用 rails new simple_cms -d mysql
创建了一个名为“simple_cms”的新 Rails 项目,该项目运行正常,然后运行 bundle install
也正常。
当我尝试运行 rails server
时,出现以下错误:
C:\Users\Hans>cd sites
C:\Users\Hans\Sites>cd simple_cms
C:\Users\Hans\Sites\simple_cms>rails server
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb:8:in
`requir e': 126: The specified module could not be found. -
C:/Ruby200-x64/lib/ruby/ge
ms/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.15/mysql2/mysql2.so
(LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.15/lib/mysql2.rb :8:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.rc2/lib/bundler.rb:132:in `require'
from C:/Users/Hans/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
C:\Users\Hans\Sites\simple_cms>
我该怎么办?顺便说一句,它找不到的模块实际上就在那里。
28-Mar-2014 在安装和重新安装所有问题之后,我仍然无法运行 rails server。由于我主要希望通过此安装来学习 Ruby on Rails,因此我安装了 Bitnami Ruby 堆栈,它会自动安装所有内容。这似乎工作正常,我已经让 Ruby、MySQL 和 Apache Web 服务器正常工作。
最佳答案
我在配置关于学习 Ruby on Rails 的 Lynda 类(class)时遇到了类似的问题。我发现了一个似乎对我有用的额外步骤。由于错误是提示 mysql 中缺少数据库,因此我创建了缺少的数据库并解决了问题。
以 root 身份登录 mysql 并提示输入密码:
mysql -u root -p
然后:
SHOW DATABASES;
CREATE DATABASE simple_cms_development;
exit;
关于ruby-on-rails - Webrick Rails 服务器无法启动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22487654/
我是 Ruby 和 Rails 新手,第一次建立项目。每次我尝试启动 WEBrick 服务器时,它都会启动然后关闭。任何帮助,将不胜感激。我似乎需要提供密码,但我不知道该怎么做。 bkuethen$
尝试在这里学习 Ruby on Rails 并遵循视频教程,但似乎无法运行环境。我现在已经使用rails new project_name 创建了一个项目,但是当我去运行服务器rails 服务器时,我
WEBrick 实例方法 mount_proc 做了什么(用简单的英语)? 文档说: mount_proc(dir, proc=nil, &block) Mounts proc or block on
首先我要说的是,我不知道自己在做什么。 好吧,既然这样,我的问题是:我正在运行 Grunt 的网络服务器来提供前端文件,并且正在运行 webrick 来提供数据 api。 Grunt 使用 grunt
首先让我说我不知道自己在做什么。 好吧,不打扰了,我的问题是:我正在运行 Grunt 的网络服务器来提供前端文件,我正在为数据 api 运行 webrick。 Grunt 使用 grunt-con
您能推荐一个修复方法吗? 我根据其他 SE 问题尝试过的补救措施: 运行捆绑安装 运行 gem 清理 运行 bundle exec rails server 运行 sudo ln -s/usr/loc
我像这样启动一个 webrick 服务器: dell@dev:/var/www/ruby$ ruby -run -httpd. -p 5000 并将此代码放入abc.rb: require 'web
我有一个在不同硬件上运行的网络应用程序,其中大部分由智能电视和机顶盒组成。 我的网络应用程序包含一个 ruby 脚本来设置应用程序以进行本地调试。此脚本构建我的应用程序,监听文件更改,并使用简单的
我之前运行的是 Linux Mint 13,现在刚切换到 Fedora 17。既然我已经切换了,我就无法再阻止 Webrick。我使用 Jetbrains Rubymine,并且启动服务器工作正常,但
我有一个非常基本的 webrick 服务器,用于运行嵌入式设备的管理页面。我们刚刚向设备添加了基本身份验证并且效果很好,但是您会像这样返回通用的“未经授权”消息: Unauthorized
我有以下代码,其中 fork 了一个 WEBrick 实例,我想等到 webrick 启动,然后再继续其余代码: require 'webrick' pid = fork do server =
如何禁止将来自 webrick 的消息回显到终端?对于出现在开头的 INFO 消息,我可以通过设置 Logger 参数来禁用它: s = WEBrick::HTTPServer.new( Port
我正在运行一个简单的 WEBrick 服务器来调试 POST 数据。我想将 POST 数据输出到日志。 我的代码是: server.mount_proc '/' do |req, res| r
就生产环境而言,使用 Phusion Passenger 或仅使用 WEBrick(例如 rails s)有什么区别? 我知道 Phusion Passenger 在 Apache 或 Nginx 上
我想在我做的时候设置默认端口 rails s 到 3010,而不必说: rails s -p 3010 ...每次。有任何想法吗? 最佳答案 您可以覆盖 Port通过将以下代码添加到 config/b
我目前有: $ rails s => Booting WEBrick => Rails 3.0.9 application starting in development on http://0.0.
如何配置 Aptana 以在 Ruby On Rails 项目上启动 webrick 服务器? 我使用选项“提升到项目”来使用 aptana 打开一个现有的 Rails 项目。我不知道如何在 Apta
我正在使用 ~/.rdebugrc 的内容运行 WEBrick文件正在 set autolist set autoeval set autoreload autolist 和 autoeval 默认开
有没有一种方法可以不冗长地启动 WEBrick 服务器。我觉得它记录了太多信息。例如: rails s --verbose=false 最佳答案 您可以在 Rails 配置中更改日志级别。 confi
目前,如果我更改lib /和app / helpers /目录中的文件,则必须重新启动服务器。有没有一种方法可以配置Rails或Webrick,以便它也可以热交换那些目录中的文件? 最佳答案 在您的c
我是一名优秀的程序员,十分优秀!