Error initializing Rails console after upgrading Bundler to 2.1.4 - ruby-on-rails

This happens ONLY on the Elastic Beanstalk machine, I have no problems when initializing the rails console locally.
We just upgraded to Bundler 2.1.4 from 1.17.3
Script used to run rails console on our EB machine:
#!/usr/bin/env bash
#
# Rails console script that can be run on AWS Elastic Beanstalk.
set -xe
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir)
EB_APP_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir)
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user)
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)
EB_PID_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_pid_dir)
EB_LOG_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_log_dir)
. $EB_SUPPORT_DIR/envvars
. $EB_SCRIPT_DIR/use-app-ruby.sh
cd $EB_APP_DEPLOY_DIR
su -s /bin/bash -c "bundle exec rails c" $EB_APP_USER
an this is the output of running said script:
Bundler will use `/tmp/bundler20200806-29516-1noiblx29516' as your home directory temporarily.
/opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/ftp.rb:23:in `<module:URI>': /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:99: warning: already initialized constant URI::VERSION_CODE
/opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:99: warning: previous definition of VERSION_CODE was here
/opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:100: warning: already initialized constant URI::VERSION
/opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:100: warning: previous definition of VERSION was here
uninitialized constant URI::Generic (NameError)
Did you mean? URI::Generic
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/ftp.rb:13:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:107:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri.rb:107:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/rfc2396_parser.rb:13:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/common.rb:13:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/common.rb:13:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/generic.rb:12:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/2.4.0/uri/generic.rb:12:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/json.rb:6:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object/json.rb:6:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object.rb:13:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/core_ext/object.rb:13:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/configuration.rb:4:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/configuration.rb:4:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie/configuration.rb:3:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie/configuration.rb:3:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie.rb:223:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie.rb:223:in `config'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie.rb:127:in `config'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/i18n_railtie.rb:11:in `<class:Railtie>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/i18n_railtie.rb:10:in `<module:I18n>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/i18n_railtie.rb:9:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/railtie.rb:4:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/railtie.rb:4:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails.rb:17:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails.rb:17:in `<top (required)>'
from /var/app/current/config/application.rb:3:in `require'
from /var/app/current/config/application.rb:3:in `<top (required)>'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/actions.rb:22:in `require'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/actions.rb:22:in `require_application!'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/console/console_command.rb:95:in `perform'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
from /opt/rubies/ruby-2.4.3/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:9:in `require'
from bin/rails:9:in `<main>'
Unsuccessfully tried doing a bundle clean --force and adding require 'uri' to the application.rb
Any hint is appreciated! Thanks.

We couldn't find a workaround for this, so we ended up downgrading to 1.17.4!

Related

Puma server won't start, libssl error - cannot find file

I'm getting the following error when trying to start puma. It is complaining that it cannot load libssl?
Any ideas?
root#7711398a00ad:/app# bundle exec puma -C config/puma.rb
bundler: failed to load command: puma (/bundle/bin/puma)
LoadError: libssl.so.1.0.0: cannot open shared object file: No such file or directory - /bundle/gems/puma-3.11.4/lib/puma/puma_http11.so
/bundle/gems/puma-3.11.4/lib/puma/server.rb:15:in `require'
/bundle/gems/puma-3.11.4/lib/puma/server.rb:15:in `<top (required)>'
/bundle/gems/puma-3.11.4/lib/puma/runner.rb:1:in `require'
/bundle/gems/puma-3.11.4/lib/puma/runner.rb:1:in `<top (required)>'
/bundle/gems/puma-3.11.4/lib/puma/cluster.rb:1:in `require'
/bundle/gems/puma-3.11.4/lib/puma/cluster.rb:1:in `<top (required)>'
/bundle/gems/puma-3.11.4/lib/puma/launcher.rb:4:in `require'
/bundle/gems/puma-3.11.4/lib/puma/launcher.rb:4:in `<top (required)>'
/bundle/gems/puma-3.11.4/lib/puma/cli.rb:6:in `require'
/bundle/gems/puma-3.11.4/lib/puma/cli.rb:6:in `<top (required)>'
/bundle/gems/puma-3.11.4/bin/puma:6:in `require'
/bundle/gems/puma-3.11.4/bin/puma:6:in `<top (required)>'
/bundle/bin/puma:23:in `load'
/bundle/bin/puma:23:in `<top (required)>'
libssl1.0.0 was pulled for security reasons. Upgrading the puma gem to the latest version (3.11.4 -> 3.12.0) fixed it for me.

heroku pg:psql got error `require': cannot load such file -- dl/import

when I tried to do heroku pg:psql --remote origin
C:\Sites\allmain\actest>heroku pg:psql --remote origin
Your version of git is 1.9.4.. Which has serious security vulnerabilities.
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
---> Connecting to DATABASE_URL
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require': cannot load such file -- dl/import (LoadError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/net-ssh-gateway-1.2.0/lib/net/ssh/gateway.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/helpers/heroku_postgresql.rb:54:in `maybe_tunnel'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/command/pg.rb:149:in `psql'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/command.rb:212:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/lib/heroku/cli.rb:34:in `start'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/heroku-3.43.5/bin/heroku:24:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/bin/heroku:23:in `load'
from C:/RailsInstaller/Ruby2.2.0/bin/heroku:23:in `<main>'
I am using
Windows 7
heroku-gem/3.43.5 (i386-mingw32) ruby/2.2.4
heroku-cli/5.2.30-bb2a990 (windows-386) go1.6.2
Edit: Heroku installs and depends on ruby 2.1.7, but for pg:psql it uses a ruby.exe in your path, which in my case is 2.3. I temporarily added a reference to 2.1 and it worked.
The only workaround I found is to pass the db url to psql directly (powershell):
psql (heroku config:get DATABASE_URL)
I also suggest you to keep git updated, simplest using chocolatey: choco install git, choco outdated to see new versions, choco upgrade to install them.

Repairing Rails and Server and on Nitrous.io

I was doing One Month Rails's tutorial on Nitrous.io. At one point, some weird files appeared on my tree, and I deleted them. Everything stopped working.
I ran:
$ git add .
$ git checkout -f
and restored the tree.
BUT, when I ran:
$ rails server
I get:
action#first-project-48185:~/pinteresting$ rails server
-bash: rails: command not found
I also tried:
$ ruby -v #and got an older version, so I reinstalled it
$ rails -v
action#first-project-48185:~/pinteresting$ rails -v
-bash: rails: command not found
When I run:
$ ruby -v #on MAC terminal, I get the correct version
$ rails -v #on MAC terminal, I get the correct version
Interestingly, when I run:
$ rails server or $ rails server -p 4000
I get:
Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server
/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
and a bunch of other text below:
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Library/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>'
Franciscos-MacBook-Pro:pinteresting franciscomello$ rails server -p 4000
/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /Users/franciscomello/Desktop/pinteresting/config/application.rb:7:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Library/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>'
What's frustrating is I was on my largest streak without any errors or bugs :(
Any ideas?
I can't tell why Rails is no longer working from those errors, but I would recommend reinstalling rails. Run the following command to reinstall Rails:
gem install rails
From here you should be able to run rails server.
You could also run bundle install within the project directory if your Gemfile includes other gems which need to be installed.

Unable to start rails server with -d switch

I am trying to start rails server as a daemon using the -d switch. I have installed thin server and working on Ubuntu. If it is started as a normal process, it works, but when using the -d switch, it complains of a server pid file /tmp/pids/server.pid
Even if I delete the file and try to start the server with -d switch, it won't start. Please help.
The error says:
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup': You have already activated daemons 1.1.9, but your Gemfile requires daemons 1.1.8. Using bundle exec may solve this. (Gem::LoadError)
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from /usr/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/boot.rb:6:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/application.rb:1:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config/environment.rb:2:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:3:in `block in <main>'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:1:in `new'
from /home/ubuntu/deploys/releases/20131001113746/config.ru:1:in `<main>'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:42:in `for'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:169:in `load_adapter'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:73:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
from /usr/lib/ruby/gems/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
from /usr/bin/thin:23:in `load'
from /usr/bin/thin:23:in `<main>'
run the server using 'bundle exec' in the start like:
bundle exec rails s -d
Alternatively, your exception trace is stating a mismatch for the activated daemons gem. To fix this, set the version of daemons gem to be greater than (instead of equal to) 1.1.8 and try.

RubyMine 3.0 setup on Windows 7

All,
I downloaded/installed 1.9.2 windows installer, and then RubyMine3.0RC, and installed it.
Opening a new Rails project, with mysql selected as the DB, gives the following error when I "RUN" it.
D:\ProgramFiles\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Users/Rob/RubymineProjects/test1/script/rails server -p 3000 -b 127.0.0.1 -e development
D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 126: The specified module could not be found. - D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError)
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2.rb:7:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `block in require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from C:/Users/Rob/RubymineProjects/test1/config/application.rb:7:in `<top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:28:in `require'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:28:in `block in <top (required)>'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'
from D:/ProgramFiles/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:27:in `<top (required)>'
from C:/Users/Rob/RubymineProjects/test1/script/rails:6:in `require'
from C:/Users/Rob/RubymineProjects/test1/script/rails:6:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
Is this supposed to happen? I have installed the mysql2 gem as well, but still seeing these messages in the console.
Thanks for any help!
Make sure you have libmysql.dll from the 5.1.x 32-bit MySQL distribution in PATH or in RUBY_HOME\bin directory.
If it doesn't help, you may have better luck reporting the issue at the mysql2 gem project homepage.
Thanks, I was able to fix the error by copying "libmySQL.dll" file from 'C:\Program Files\MySQL\MySQL Server 5.1\bin' to 'C:\Ruby192\bin'.
For details, refer to post - http://rorguide.blogspot.com/2011/03/getting-error-specified-module-could.html

Resources