在rails中创建数据库时未初始化的常量V8 :: JSError错误

时间:2015-01-06 12:42:54

标签: ruby-on-rails ruby

我在一个月前创建了一个名为 blog 的项目,在Linux中有一些功能,现在,我正在尝试使用rails安装程序(Windows)运行相同的功能。 我通过命令提示符成功安装了所有必需的gem。

的Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'devise'

# Use jquery as the JavaScript library
gem 'jquery-rails'

gem 'jquery-datatables-rails','1.10.0'

gem 'geocoder'

gem "paperclip"

gem 'prawn'

gem 'will_paginate', '~> 3.0'

gem 'ajaxful_rating', '3.0.0.beta8'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

#Twitter bootstrap
gem 'less-rails'
gem 'twitter-bootstrap-rails'

gem 'libv8', '~> 3.11.8'
gem 'therubyracer', require: 'v8'

group :development, :test do
  gem 'rspec-rails', '~> 3.0.0.beta'
  gem "factory_girl_rails"
  gem "capybara", '~> 2.2.1'
  gem "guard-rspec"
end


group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

我的database.yml是:

development:
  adapter: sqlite3
  database: blog
  pool: 5
  timeout: 5000

捆绑安装后,当我运行

rake db:create ,我收到以下错误:

D:\rails_4\blog>rake db:create
rake aborted!
uninitialized constant V8::JSError
D:/rails_4/blog/config/application.rb:7:in `<top (required)
D:/rails_4/blog/Rakefile:4:in `<top (required)>'

我尝试在命令之前使用bundle exec但没有用。

请帮帮我。

提前致谢

0 个答案:

没有答案