gems

Rails 5 db migration: how to fix ActiveRecord::ConcurrentMigrationError

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: A previous rake db:rollback stalled. Now when attempting a new migration we get the following error: rake aborted! ActiveRecord::ConcurrentMigrationError: Cannot run migrations because another migration process is currently running. /home/me/.rvm/gems/ruby-2.4.1@global/gems/activerecord- 5.1.4/lib/active_record/migration.rb:1315:in `with_advisory_lock' /home/me/.rvm/gems/ruby-2.4.1@global/gems/activerecord-5.1.4/lib/active_record/migration.rb:1148:in `migrate' /home/me/.rvm/gems/ruby-2.4.1@global/gems/activerecord-5.1.4/lib/active_record

Database configuration does not specify adapter (Sinatra + Heroku + Activerecord)

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm getting an error (on Sinatra + ActiveRecord Heroku) that Database configuration does not specify adapter . From some research, it looks like this is because Heroku expects there to be no environmental variables used during rackup. I removed the env vars from the db environments file that listed the database URL, but I'm still getting the same error. EDIT: This also worked just a day ago with the db files unchanged, so I'm not sure what could be wrong. 2015-09-01T02:44:40.980448+00:00 app[web.1]: I, [2015-09-01T02:44:40.980313 #3] INFO --

FATAL: role “root” does not exist

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I trying to create rails application with postgresql database, but when I create database rake db:migrate bash show me an error FATAL: role "my" does not exist how fix? sorry for my bad English UPD my@my-P5K-SE ~/ror/timonin $ rake db:create FATAL: role "my" does not exist /usr/local/rvm/gems/ruby-2.1.3/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:898:in `rescue in connect' /usr/local/rvm/gems/ruby-2.1.3/gems/activerecord-4.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'

Selenium::WebDriver::Error::MoveTargetOutOfBoundsError: Element cannot be scrolled into view:[object HTMLSpanElement]

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Something strange is happening on this page: require "watir-webdriver" b = Watir :: Browser . new b . goto "http://mideastunes.com/" b . div ( class : "feat-container" ). element ( css : "a span" ). present ? => true b . div ( class : "feat-container" ). element ( css : "a span" ). click Selenium :: WebDriver :: Error :: MoveTargetOutOfBoundsError : Element cannot be scrolled into view :[ object HTMLSpanElement ] from / Users / zeljko /. rvm / gems / ruby - 1.9 . 2 - p290@gretel / gems / selenium - webdriver - 2.19 . 0 / lib /

PG::Error: ERROR: permission denied for relation schema_migrations

匿名 (未验证) 提交于 2019-12-03 00:52:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Not sure why I'm running into this error. I've setup postgresql properly, just ran a migration and then rake db:migrate and I'm getting the title error. Here is my: database.yml development: adapter: postgresql encoding: unicode database: my_blog_development pool: 5 username: my_blog password: test: adapter: postgresql encoding: unicode database: my_blog_test pool: 5 username: my_blog password: production: adapter: postgresql encoding: unicode database: my_blog_production pool: 5 username: my_blog password: Full error: [my_blog]$rake db

undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)

匿名 (未验证) 提交于 2019-12-03 00:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on rails, suddenly rails server stops working. It's working fine and I have used following command [platform windows 7] gem install -v=2.3.5 rails And when I use rails s , it's giving the following error: c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError) from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/rails_generator/base.rb:90:in ` ' from c:/Ruby193/lib/ruby/gems/1.9.1

Heroku app crashes with 'libruby.so.1.9: cannot open shared object file' [closed]

匿名 (未验证) 提交于 2019-12-03 00:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've never had problems deploying this app but I've just pushed and now I'm getting this weird error, which is deep enough in the stack that it's not even getting sent to Airbrake. I have a feeling it might be a problem at Heroku's end, possibly relating to https://status.heroku.com/incidents/450 ? What do you think? 2012-10-14T08:40:31+00:00 heroku[web.1]: State changed from starting to crashed 2012-10-14T08:40:31+00:00 heroku[web.1]: State changed from crashed to starting 2012-10-14T08:40:35+00:00 heroku[web.1]: Starting process with

RSpec - Undefined method `key?'

匿名 (未验证) 提交于 2019-12-03 00:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to run a test for rendering templates and ran into the error: undefined method `key?' for 1014:Fixnum The stub of my model's instance works as it should in my route tests but not so much here. What am I doing wrong? describe RestaurantsController do let(:restaurant) { FactoryGirl.build_stubbed(:restaurant) } describe 'GET #show' do before { get :show, restaurant.id } it { should render_template('show') } end end Full Error 1) RestaurantsController GET #show Failure/Error: before { get :show, restaurant.id } NoMethodError:

Install a specific set of gems in a CircleCI configuration file

匿名 (未验证) 提交于 2019-12-03 00:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to build a CircleCI configuration file that only installs a specific set of gems via the environment parameter. In this case let's call that environment continuous_integration and this environment matches the test environment. So far I have tried a number of things and this is my current configuration in this spike. Could anyone point me in the right direction? Is this possible? machine: timezone: America/Los_Angeles ruby: version: 2.4.1 services: - redis environment: RAILS_ENV: continous_integration database: override: - bundle

pod 突然失效,重装ruby吧少年

匿名 (未验证) 提交于 2019-12-03 00:27:02
pod search *** 的时候报错,什么鬼?。。 /Users/tuoge/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/yaml.rb:5:in `<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. /Users/tuoge/.rvm/rubies/ruby-2.4.1/lib/ruby/2.4.0/yaml.rb:5:in `<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. /Users/tuoge/.rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require':