I ran a recipe to install the mysql-client and mysql-server on my rhel6 linux box. The recipes used were downloaded from supermarket using knife tool.
i am following this tutorial step by step.
on executing this command:
chef-solo -c solo.rb -j web.json
====
I got the following error.
Recipe: mysql::client
* package[mysql] action install (up to date)
* package[mysql-devel] action install
================================================================================
**Error executing action `install` on resource 'package[mysql-devel]'**
================================================================================
Chef::Exceptions::Exec
----------------------
returned 1, expected 0
Resource Declaration:
---------------------
# In /home/subham/chef-repo/chef-repo/cookbooks/mysql/recipes/client.rb
47: package name
48: end
Compiled Resource:
------------------
# Declared in /home/subham/chef-repo/chef-repo/cookbooks/mysql/recipes/client.rb:47:in `block in from_file'
package("mysql-devel") do
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "mysql-devel"
version "5.1.61-4.el6"
timeout 900
cookbook_name :mysql
recipe_name "client"
end
Running handlers:
[2014-11-26T06:22:23-05:00] ERROR: Running exception handlers
Running handlers complete
[2014-11-26T06:22:23-05:00] ERROR: Exception handlers complete
[2014-11-26T06:22:23-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated in 29.10138575 seconds
[2014-11-26T06:22:24-05:00] ERROR: package[mysql-devel] (mysql::client line 47) had an error: Chef::Exceptions::Exec: returned 1, expected 0
[2014-11-26T06:22:24-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Stacktrace at /var/chef/cache/chef-stacktrace.out
Generated at 2014-11-26 06:22:23 -0500
Chef::Exceptions::Exec: package[mysql-devel] (mysql::client line 47) had an error: Chef::Exceptions::Exec: returned 1, expected 0
/opt/chefdk/embedded/apps/chef/lib/chef/mixin/command.rb:158:in `handle_command_failures'
/opt/chefdk/embedded/apps/chef/lib/chef/provider/package/yum.rb:1021:in `yum_command'
/opt/chefdk/embedded/apps/chef/lib/chef/provider/package/yum.rb:1136:in `install_package'
/opt/chefdk/embedded/apps/chef/lib/chef/provider/package.rb:82:in `block in action_install'
/opt/chefdk/embedded/apps/chef/lib/chef/mixin/why_run.rb:52:in `call'
/opt/chefdk/embedded/apps/chef/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chefdk/embedded/apps/chef/lib/chef/provider.rb:156:in `converge_by'
/opt/chefdk/embedded/apps/chef/lib/chef/provider/package.rb:80:in `action_install'
/opt/chefdk/embedded/apps/chef/lib/chef/provider.rb:121:in `run_action'
/opt/chefdk/embedded/apps/chef/lib/chef/resource.rb:648:in `run_action'
/opt/chefdk/embedded/apps/chef/lib/chef/runner.rb:49:in `run_action'
/opt/chefdk/embedded/apps/chef/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chefdk/embedded/apps/chef/lib/chef/runner.rb:81:in `each'
/opt/chefdk/embedded/apps/chef/lib/chef/runner.rb:81:in `block in converge'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chefdk/embedded/apps/chef/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chefdk/embedded/apps/chef/lib/chef/runner.rb:80:in `converge'
/opt/chefdk/embedded/apps/chef/lib/chef/client.rb:345:in `converge'
/opt/chefdk/embedded/apps/chef/lib/chef/client.rb:431:in `do_run'
/opt/chefdk/embedded/apps/chef/lib/chef/client.rb:213:in `block in run'
/opt/chefdk/embedded/apps/chef/lib/chef/client.rb:207:in `fork'
/opt/chefdk/embedded/apps/chef/lib/chef/client.rb:207:in `run'
/opt/chefdk/embedded/apps/chef/lib/chef/application.rb:236:in `run_chef_client'
/opt/chefdk/embedded/apps/chef/lib/chef/application/solo.rb:226:in `block in run_application'
/opt/chefdk/embedded/apps/chef/lib/chef/application/solo.rb:218:in `loop'
/opt/chefdk/embedded/apps/chef/lib/chef/application/solo.rb:218:in `run_application'
/opt/chefdk/embedded/apps/chef/lib/chef/application.rb:55:in `run'
/opt/chefdk/embedded/apps/chef/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:33:in `load'
/usr/bin/chef-solo:33:in `<main>'
File at /home/subham/chef-repo/chef-repo/cookbooks/mysql/recipes/client.rb
line 46 : node['mysql']['client']['packages'].each do |name|
line 47 : package name
line 48 : end
In the header comment section of the same file
# Include Opscode helper in Recipe class to get access
# to debian_before_squeeze? and ubuntu_before_lucid?
Does it mean that this recipe will only work in debian family based systems like ubuntu and not in RHEL or fedora/Cent OS ?
If yes then what changes i need to perform ?
Related
I tried to install phpmyadmin a couple of times but failed. I was constantly changing homestead.yaml, but vagrant is constantly throwing me an error when I try command vagrant reload --provision. Vagrant works for me with an ordinary laravl project.
homestead.yaml
---
folders:
- map: E:\projects
to: /home/vagrant/code
- map: E:\projects\phpmyadmin
to: /home/vagrant/code/phpmyadmin
sites:
- map: dev-cms.com
to: /home/vagrant/code/new-blog/public
- map: phpmyadmin.test
to: /home/vagrant/code/new-blog/phpmyadmin
databases:
- homestead
Vagrant error when type vagrant reload --provision
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse': (<unknown>): mapping values are not allowed in this context at line 22 column 9 (Psych::SyntaxError)
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse_stream'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:390:in `parse'
from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:277:in `load'
from C:/Users/User/Homestead/Vagrantfile:29:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:126:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:119:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/config/loader.rb:116:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/vagrantfile.rb:29:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:793:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:974:in `process_configured_plugins'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:178:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/bin/vagrant:194:in `<main>'
Host windows file
192.168.56.56 dev-cms.com
127.0.0.1 phpmyadmin.test
the yaml as it is provided in the question has some indentation issue, you can review yaml lint to validate your yaml file.
The following one will be valid
---
databases:
- homestead
folders:
- map: "E:\\projects"
to: /home/vagrant/code
- map: "E:\\projects\\phpmyadmin"
to: /home/vagrant/code/phpmyadmin
sites:
- map: dev-cms.com
to: /home/vagrant/code/new-blog/public
- map: phpmyadmin.test
to: /home/vagrant/code/new-blog/phpmyadmin
note:
additional space on 1st line
wrong indentation for the 2nd site to: /home/vagrant/code/new-blog/phpmyadmin
I saw a very similar question to mine. Everything works fine on OS X, but throws errors on ubuntu 14.04. Retracing that post, I am getting the same error. The original poster gave up and used Poltergeist / PhantomJS instead. I'd like to make this work with Chrome now that PhantomJS is no longer being maintained.
Net::ReadTimeout: Net::ReadTimeout and Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start on Rails 5.1.beta System Test
Here are my install steps on Ubuntu:
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/google-chrome.list
deb http://dl.google.com/linux/chrome/deb/ stable main
EOF
apt-get update
apt-get install --force-yes -y google-chrome-stable
cd /root/ && curl -O "http://chromedriver.storage.googleapis.com/2.32/chromedriver_linux64.zip"
cd /root/ && unzip chromedriver_linux64.zip && cp chromedriver /usr/bin
Taking one step at a time, I confirmed google-chrome, chromedriver installed correctly and work fine. Selenium driver also works fine.
link = ENV['LINK'] || "https://www.amazon.com"
#https://stackoverflow.com/questions/44424200/how-do-i-use-selenium-webdriver-on-headless-chrome
Selenium::WebDriver::Chrome.driver_path="/usr/bin/chromedriver" if RUBY_PLATFORM.include? "linux"
options = %w[--headless --disable-gpu]
options += %w[--binary='/usr/bin/google-chrome'] if RUBY_PLATFORM.include? "linux"
driver = Selenium::WebDriver.for :chrome, switches: options
driver.navigate.to "#{link}"
driver.save_screenshot("./screen.png")
driver.quit
The Capybara test times out while visiting the url.
require 'capybara'
include Capybara::DSL
link = ENV['LINK'] || "https://www.amazon.com"
options = %w[--headless --disable-gpu]
options += %w[--binary='/usr/bin/google-chrome'] if RUBY_PLATFORM.include? "linux"
Selenium::WebDriver::Chrome.driver_path="/usr/bin/chromedriver" if RUBY_PLATFORM.include? "linux"
Capybara.register_driver(:headless_chrome) do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( chromeOptions: { args: options } )
Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities )
end
Capybara.javascript_driver = :headless_chrome
session = Capybara::Session.new(:headless_chrome)
session.visit "#{link}"
The error is the following msg:
session.visit "#{link}"
Net::ReadTimeout: Net::ReadTimeout
from /usr/lib/ruby/2.3.0/net/protocol.rb:158:in `rbuf_fill'
from /usr/lib/ruby/2.3.0/net/protocol.rb:136:in `readuntil'
from /usr/lib/ruby/2.3.0/net/protocol.rb:146:in `readline'
from /usr/lib/ruby/2.3.0/net/http/response.rb:40:in `read_status_line'
from /usr/lib/ruby/2.3.0/net/http/response.rb:29:in `read_new'
from /usr/lib/ruby/2.3.0/net/http.rb:1437:in `block in transport_request'
from /usr/lib/ruby/2.3.0/net/http.rb:1434:in `catch'
from /usr/lib/ruby/2.3.0/net/http.rb:1434:in `transport_request'
from /usr/lib/ruby/2.3.0/net/http.rb:1407:in `request'
from /usr/lib/ruby/2.3.0/net/http.rb:1400:in `block in request'
from /usr/lib/ruby/2.3.0/net/http.rb:853:in `start'
from /usr/lib/ruby/2.3.0/net/http.rb:1398:in `request'
from /var/www/railsapp/vendor/bundle/ruby/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/default.rb:107:in `response_for'
from /var/www/railsapp/vendor/bundle/ruby/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/default.rb:58:in `request'
from /var/www/railsapp/vendor/bundle/ruby/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
from /var/www/railsapp/vendor/bundle/ruby/2.3.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/bridge.rb:649:in `raw_execute'
... 10 levels...
from /usr/bin/irb:11:in `<top (required)>'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `load'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:27:in `run'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:332:in `exec'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:34:in `block in <top (required)>'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
from /usr/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/exe/bundle:26:in `<top (required)>'
from /usr/bin/bundle:23:in `load'
from /usr/bin/bundle:23:in `<main>'
Headless Chrome and the chromedriver that support it are relatively new. Update your selenium-webdriver to the latest versions (3.5.2 as of this answer) to have support for it. Once you've done that, if you're using the latest Capybara, you can also try just using the Capybara provided registered driver, with
if RUBY_PLATFORM.include? "linux"
Selenium::WebDriver::Chrome.driver_path = "/usr/bin/chromedriver"
Selenium::WebDriver::Chrome.path = "/usr/bin/google-chrome"
end
Capybara.javascript_driver = :selenium_chrome_headless
rather than needing to register your own driver.
I am using the hanami framework and the rspec lib to test my code and PG database. When I trying to test one action I get following error:
PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
My action has been wrapped in repository transaction:
def call(params, dependencies)
begin
dependencies.repository.transaction do
create_user(params, dependencies)
assign_tags(params, dependencies)
assign_notes(params, dependencies)
end
rescue Hanami::Model::Error, Domain::Errors::Exception => error
raise Domain::Errors::CreateUserFailed, error.message
end
end
Here you can see part of my test which are failing:
it 'should raise exception if params contains duplicated email' do
expect{service.call(duplicated_email)}
.to raise_exception(Domain::Errors::CreateUserFailed)
.with_message('Duplicated values found (id or
email)')
end
it 'should raise exception if params contains duplicated note id' do
expect{service.call(duplicated_note_id)}
.to raise_exception(Domain::Errors::CreateUserFailed)
end
First test pass but the second one raises exception I mentioned earlier. I know this is caused that previous test raised exception in transaction block. I have found solution mentioned in this answer but I don't work in my case.
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with :deletion
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
end
Thanks for all answers:)
EDIT:
Failure/Error:
expect{service.call(duplicated_note_id)}
.to raise_exception(Domain::Errors::CreateUserFailed)
.with_message('Duplicated values found in user notes (id)')
expected Domain::Errors::CreateUserFailed with "Duplicated values found in user notes (id)", got #<Domain::Errors::CreateUserFailed: PG::InFailedSqlTransaction: ERROR: current transaction is aborted, commands ignored until end of transaction block
> with backtrace:
# ./lib/domain/commands/create_user.rb:17:in `rescue in call'
# ./lib/domain/commands/create_user.rb:8:in `call'
# ./spec/domain/commands/create_user_spec.rb:210:in `block (3 levels) in <top (required)>'
# ./spec/domain/commands/create_user_spec.rb:210:in `block (2 levels) in <top (required)>'
# ./spec/domain/commands/create_user_spec.rb:210:in `block (2 levels) in <top (required)>'
Can anybody help me to solve the following error ?When i typed rake db:create on cmd i got these errors.
Error:
rake aborted!
NoMethodError: undefined method `each' for #<String:0x1a1af20>
Tasks: TOP => db:create => db:load_config
(See full trace by running task with --trace)
When i run rake db:create --trace i got the following traces.
rake aborted!
NoMethodError: undefined method `each' for #
Tasks: TOP => db:create => db:load_config
(See full trace by running task with --trace)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
rake aborted!
NoMethodError: undefined method `each' for #<String:0x1a37888>
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.2.0/lib/active_record/connect
ion_adapters/connection_specification.rb:150:in `resolve_all'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.2.0/lib/active_record/connect
ion_handling.rb:69:in `resolve'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.2.0/lib/active_record/core.rb
:46:in `configurations='
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.2.0/lib/active_record/railtie
s/databases.rake:5:in `block (2 levels) in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `block i
n execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute
'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:179:in `block i
n invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_
with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:201:in `block i
n invoke_prerequisites'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_
prerequisites'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:178:in `block i
n invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_
with_call_chain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in `
invoke_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `
block (2 levels) in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `
each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `
block in top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in `
run_with_threads'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:in `
top_level'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in `b
lock in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `r
un'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in `<top (required)>
'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'
Tasks: TOP => db:create => db:load_config
My database.yml file is described below.
default:&default
adapter:mysql2
encoding:utf8
pool:5
username:root
password:pass
host:localhost
development:<<:*default
database:sqlbook_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:<<:*default
database:sqlbook_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="mysql2://myuser:mypass#localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production:<<:*default
database:sqlbook_production
username:sqlbook
password:pass
I am using rails version 4.2.0 and ruby 1.9.3.Please help me to resolve this error.Thanks in advance..
I'm trying initialize my local rails server but I haven't been able to,
because when I write "rails server", show me this message:
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require': wrong number of arguments (2 for 1) (ArgumentError)
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:596:in
`new_constants_in'
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:225:in
`load_dependency'
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
activesupport-3.0.3/lib/active_support/dependencies.rb:239:in
`require'
from /home/distriker/Documentos/public_html/auth/config.ru:6
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
rack-1.2.3/lib/rack/builder.rb:46:in `instance_eval'
from /home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/
rack-1.2.3/lib/rack/builder.rb:46:in `initialize'
from /home/distriker/Documentos/public_html/auth/config.ru:1:in `new'
from /home/distriker/Documentos/public_html/auth/config.ru:1
Regards, Iván
That appears to be a bug in "/home/distriker/Documentos/public_html/auth/mysql2/ruby/1.8/gems/ activesupport-3.0.3/lib/active_support/dependencies.rb" line 239. It's calling:
require 'one/thing', 'another/thing'
It's possible that something in your config is causing it to do this.
[Off-topic]
English help :)
"I haven't can" => "I haven't been able to"
"Rewards, Iván" => "Regards, Iván"
Hopefully you don't mind.
[/Off-topic]
EDIT | I'd probably check this line first: "/home/distriker/Documentos/public_html/auth/config.ru:6"