RuntimeError (install the jdbcmysql adapter: `gem install activerecord-jdbcmysql-adapter` (no download file - java))

My Rails server worked well with a regular development script, and I planned to use Netbeans for Rails. When I started my existing project with Netbeans and restarted my Webrick server, it shows an error

RuntimeError (install the jdbcmysql adapter: gem install activerecord-jdbcmysql-adapter(there is no such file to download - java))

I feel this error is related to JRuby, but I never use JRuby, and I use Ruby 1.9.2, Rails 3.0.0, and I don't want to use JRuby and Glassfish. I tried removing the default JRuby and Ruby1.9.2 by default, but I cannot. I feel that there might be a reason for binding the wrt JRuby error. Please help me fix this problem.

+3
source share
4 answers

Received the same error. Look in config / database.yml - netbeans automatically changes the adapter. Just write "sqlite3" as an adapter or something suitable for you instead of "jdbcmysql".

Hope I can help!

+6
source

I solved this problem in Netbeans ,, I installed Ruby 1.9.2 by default

Project → Right-click “My Project” → Set Configuration → Configure → Changed Ruby Platform as “Ruby 1.9.2” from “JRuby”.

Now it works without errors. This may help another reader.

“Thank you, Palani Kannan.” TO,

+1

, . : gem install activerecord-jdbcmysql-adapter, , database.yml , :

development:
  adapter: jdbcmysql
  encoding: utf8
  reconnect: false
  database: db_development
  pool: 5
  username: username
  password: passwrd
  socket: /var/run/mysqld/mysqld.sock
+1

database.yml, , jdbcmysql.   !

:

 development:
    adapter: jdbcmysql

mysql

 development:
    adapter: mysql2

!

+1

Source: https://habr.com/ru/post/1774061/


All Articles