- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
运行任何 rails 命令(如 rails s
)时出现以下错误或 rails c
,这也阻止了我的 heroku 应用程序启动(同样的错误):
app/config/application.rb:7:in `<top (required)>': uninitialized constant Bundler (NameError)
from /Users/you/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
Bundler.require(:default, Rails.env)
bundle exec rails s
成功了,但这对 heroku 应用程序没有帮助。我已验证
which ruby
,
which rails
和
which bundler
.我也试过启动一个新的 rvm gemset 并重新安装包。 heroku 错误是相同的:
/app/config/application.rb:7:in `<top (required)>': uninitialized constant Bundler (NameError)
bundle check
返回没有问题。
bundle config --delete bin # Turn off Bundler's stub generator
rake rails:update:bin # Use the new Rails 4 executables
git add bin # Add bin/ to source control
rails g model
这弹出了:
Bundler is using a binstub that was created for a different gem.
This is deprecated, in future versions you may need to `bundle binstub rails` to work around a system/bundle conflict.
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.3'
gem 'sass-rails', '~> 4.0.1'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder'
gem 'bcrypt-ruby'
gem "geocoder"
gem 'gmaps4rails'
gem "paperclip"
gem 'route_translator'
gem 'aws-sdk'
gem 'ckeditor'
gem 'soundcloud'
gem 'omniauth-facebook'
gem 'twitter'
gem 'pg'
gem 'unicorn'
gem 'sass'
gem 'compass', '0.12.2'
gem 'font-awesome-rails'
gem 'acts-as-taggable-on'
gem 'json', '1.7.7'
gem 'figaro'
#for mailchimp api
gem 'gibbon'
#for deploying
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rails', '~> 1.1.0'
gem 'capistrano-bundler'
gem 'capistrano-rbenv', '~> 2.0'
gem 'exception_notification'
gem 'textacular'
gem 'mail_form'
gem 'dumper'
group :doc do
gem 'sdoc', require: false
end
# development gems
group :development, :test do
# env variables
gem "faker"
end
# Paging
gem 'kaminari'
gem 'will_paginate-bootstrap', '~> 1.0.0'
# Slugs and friendly id's
gem 'friendly_id'
# font-awesome
gem 'font-awesome-sass', '~> 4.0.2'
# production gems for heroku
group :production do
gem 'rails_12factor'
gem 'therubyracer'
gem 'execjs'
end
# Devise
gem 'devise'
gem 'chosen-rails'
# Bootstrap 3
group :development, :test do
gem 'rails_layout' # Bootstrap 3 layout generator
end
gem 'bootstrap-sass', '~> 3.0.3.0'
# RSpec
group :test, :development do
gem "rspec-rails"
gem "factory_girl_rails"
end
# Capybara
group :test do
gem "capybara"
gem 'email_spec'
end
remote: https://rubygems.org/
specs:
actionmailer (4.0.3)
actionpack (= 4.0.3)
mail (~> 2.5.4)
actionpack (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.3)
activesupport (= 4.0.3)
builder (~> 3.1.0)
activerecord (4.0.3)
activemodel (= 4.0.3)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.3)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.3)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
acts-as-taggable-on (3.1.1)
actionpack (>= 3, < 5)
activerecord (>= 3, < 5)
activesupport (>= 3, < 5)
addressable (2.3.6)
arel (4.0.2)
aws-sdk (1.38.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
bootstrap-sass (3.0.3.0)
sass (~> 3.2)
builder (3.1.4)
capistrano (3.0.1)
i18n
rake (>= 10.0.0)
sshkit (>= 0.0.23)
capistrano-bundler (1.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-rails (1.1.0)
capistrano (>= 3.0.0)
capistrano-bundler (>= 1.0.0)
capistrano-rbenv (2.0.1)
capistrano (~> 3.0)
sshkit (~> 1.3)
capybara (2.2.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chosen-rails (1.1.0)
coffee-rails (>= 3.2)
compass-rails (>= 1.1.2)
railties (>= 3.0)
sass-rails (>= 3.2)
chunky_png (1.3.0)
ckeditor (4.0.11)
mime-types
orm_adapter (~> 0.5.0)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
compass-rails (1.1.7)
compass (>= 0.12.2)
sprockets (<= 2.11.0)
devise (3.2.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
dumper (1.5.0)
multi_json (>= 1.0)
multipart-post (>= 1.1.5)
posix-spawn (>= 0.3.6)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
erubis (2.7.0)
exception_notification (4.0.1)
actionmailer (>= 3.0.4)
activesupport (>= 3.0.4)
execjs (2.0.2)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.4.1)
factory_girl (~> 4.4.0)
railties (>= 3.0.0)
faker (1.3.0)
i18n (~> 0.5)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
font-awesome-sass (4.0.3.1)
sass (~> 3.2)
friendly_id (5.0.3)
activerecord (>= 4.0.0)
fssm (0.2.10)
geocoder (1.2.0)
gibbon (1.1.2)
httparty
multi_json (>= 1.3.4)
gmaps4rails (2.1.2)
hashie (2.1.1)
hike (1.2.3)
httmultiparty (0.3.14)
httparty (>= 0.7.3)
mimemagic
multipart-post
httparty (0.11.0)
multi_json (~> 1.0)
multi_xml (>= 0.5.2)
i18n (0.6.9)
jbuilder (2.0.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.7)
jwt (0.1.11)
multi_json (>= 1.5)
kaminari (0.15.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.2)
launchy (2.4.2)
addressable (~> 2.3)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mail_form (1.5.0)
actionmailer (>= 3.2, < 5)
activemodel (>= 3.2, < 5)
mime-types (1.25.1)
mimemagic (0.2.1)
mini_portile (0.5.3)
minitest (4.7.5)
multi_json (1.9.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.0)
net-ssh (>= 2.6.5)
net-ssh (2.8.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
orm_adapter (0.5.0)
paperclip (4.1.1)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
mime-types
pg (0.17.1)
polyglot (0.3.4)
posix-spawn (0.3.8)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.3)
actionmailer (= 4.0.3)
actionpack (= 4.0.3)
activerecord (= 4.0.3)
activesupport (= 4.0.3)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.3)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_layout (1.0.14)
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.0.3)
actionpack (= 4.0.3)
activesupport (= 4.0.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.0)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.5)
route_translator (3.2.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
rspec-rails (2.14.2)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
simple_oauth (0.2.0)
soundcloud (0.3.2)
hashie (~> 2.0)
httmultiparty (~> 0.3.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sshkit (1.4.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
term-ansicolor
term-ansicolor (1.3.0)
tins (~> 1.0)
textacular (3.2.0)
activerecord (>= 3.0, < 4.2)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
tins (1.1.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
twitter (4.8.1)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
tzinfo (0.3.39)
uglifier (2.2.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.8.2)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
uuidtools (2.1.4)
warden (1.2.3)
rack (>= 1.0)
will_paginate (3.0.5)
will_paginate-bootstrap (1.0.0)
will_paginate (>= 3.0.3)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
acts-as-taggable-on
aws-sdk
bcrypt-ruby
bootstrap-sass (~> 3.0.3.0)
capistrano (~> 3.0.1)
capistrano-bundler
capistrano-rails (~> 1.1.0)
capistrano-rbenv (~> 2.0)
capybara
chosen-rails
ckeditor
coffee-rails
compass (= 0.12.2)
devise
dumper
email_spec
exception_notification
execjs
factory_girl_rails
faker
figaro
font-awesome-rails
font-awesome-sass (~> 4.0.2)
friendly_id
geocoder
gibbon
gmaps4rails
jbuilder
jquery-rails
json (= 1.7.7)
kaminari
mail_form
omniauth-facebook
paperclip
pg
rails (= 4.0.3)
rails_12factor
rails_layout
route_translator
rspec-rails
sass
sass-rails (~> 4.0.1)
sdoc
soundcloud
textacular
therubyracer
turbolinks
twitter
uglifier
unicorn
will_paginate-bootstrap (~> 1.0.0)
bundle install
,并尝试运行
rails s
或任何 rake 任务,我复制
bundler
错误。但是,如果我再做
gem install bundler
和
gem install rake
,新的 repo 将正常工作。在我的原始存储库中卸载并重新安装两个 gem 不会解决问题。很高兴我找到了一个准修复,但仍然想深入了解这个问题。
bundle update
在使用默认 gemset 测试命令之前。
uninitialized constant
仍然存在。
最佳答案
这些命令来自 bundler FAQ做到了:
#remove project-specific settings
rm -rf .bundle/
# remove project-specific cached gems and repos
rm -rf vendor/cache/
# remove the saved resolve of the Gemfile
rm -rf Gemfile.lock
bundle install
重新 bundle
BUNDLE INSTALL --BINSTUBS
,再次来自
bundler docs
关于ruby-on-rails - Rails 未初始化的常量 Bundler (NameError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23130295/
以下是一个非常简单的ruby服务器。 require 'socket' local_socket = Socket.new(:INET, :STREAM) local_addr = Socket.
我正在使用 OS X(使用 bash),并且是 unix 的新手。我想知道是否可以修改一些文件以便运行 ruby 程序,我不需要“ruby file.rb”,而是可以运行“ruby.rb”。 有理
我在用 Ruby 替换字符串时遇到一些问题。 我的原文:人之所为不如兽之所为。 我想替换为:==What== human does is not like ==what== animal does.
我想在一个循环中从 Ruby 脚本做这样的事情: 写一个文件a.rb(每次迭代都会改变) 执行系统(ruby 'a.rb') a.rb 将带有结果的字符串写入文件“results” a.rb 完成并且
我的问题是尝试创建一个本地服务器,以便我可以理解由我的新团队开发的应用程序。我的问题是我使用的是 Ruby 2.3.3,而 Gemfile 需要 2.3.1。我无法编辑 Gemfile,因为我被告知很
我有一个使用 GLI 框架用 Ruby 编写的命令行实用程序。我想在我的主目录中配置我的命令行实用程序,使用 Ruby 本身作为 DSL 来处理它(类似于 Gemfile 或 Rakefile)。 我
我的 Rails 应用 Controller 中有这段代码: def delete object = model.datamapper_class.first(:sourced_id =>
我正在寻找的解析器应该: 对 Ruby 解析友好, 规则设计优雅, 产生用户友好的解析错误, 用户文档的数量应该比计算器示例多, UPD:允许在编写语法时省略可选的空格。 快速解析不是一个重要的特性。
我刚开始使用 Ruby,听说有一种“Ruby 方式”编码。除了 Ruby on Rails 之外,还有哪些项目适合学习并被认可且设计良好? 最佳答案 Prawn被明确地创建为不仅是一个该死的好 PDF
我知道之前有人问过类似的问题,但是我该如何构建一个无需在前面输入“ruby”就可以在终端中运行的 Ruby 文件呢? 这里的最终目标是创建一个命令行工具包类型的东西。现在,为了执行我希望用户能够执行的
例如哈希a是{:name=>'mike',:age=>27,:gender=>'male'}哈希 b 是 {:name=>'mike'} 我想知道是否有更好的方法来判断 b 哈希是否在 a 哈希内,而
我是一名决定学习 Ruby 和 Ruby on Rails 的 ASP.NET MVC 开发人员。我已经有所了解并在 RoR 上创建了一个网站。在 ASP.NET MVC 上开发,我一直使用三层架构:
最近我看到 Gary Bernhardt 展示了他用来在 vim 中执行 Ruby 代码的 vim 快捷方式。捷径是 :map ,t :w\|:!ruby %. 似乎这个方法总是执行系统 Rub
在为 this question about Blue Ruby 选择的答案中,查克说: All of the current Ruby implementations are compiled to
我有一个 Ruby 数组 > list = Request.find_all_by_artist("Metallica").map(&:song) => ["Nothing else Matters"
我在四舍五入时遇到问题。我有一个 float ,我想将其四舍五入到小数点后的百分之一。但是,我只能使用 .round ,它基本上将它变成一个 int,意思是 2.34.round # => 2. 有没
我使用 ruby on rails 编写了一个小型 Web 应用程序,它的主要目的是上传、存储和显示来自 xml(文件最多几 MB)文件的结果。运行大约 2 个月后,我注意到 mongrel 进程
我们如何用 Ruby 转换像这样的字符串: 𝑙𝑎𝑡𝑜𝑟𝑟𝑒 收件人: Latorre 最佳答案 s = "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" => "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" s.u
通过 ruby monk 时,他们偶尔会从左侧字段中抛出一段语法不熟悉的代码: def compute(xyz) return nil unless xyz xyz.map {|a,
不确定我做错了什么,但我似乎弄错了。 问题是,给你一串空格分隔的数字,你必须返回最大和最小的数字。 注意:所有数字都是有效的 Int32,不需要验证它们。输入字符串中始终至少有一个数字。输出字符串必须
我是一名优秀的程序员,十分优秀!