rake db:schema:dump rake aborted!

123 views
Skip to first unread message

Majid Lotfi

unread,
May 1, 2018, 9:22:50 AM5/1/18
to Ruby on Rails: Talk
Hi,
I am following lynda training in my windows 7, I don't know what cause this error :

 rake db:schema:dump

rake aborted!
LoadError: cannot load such file -- mysql2/2.4/mysql2
C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/Rakefile:4:in `require_relative'
C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

Thanks, your help is appreciated.

Walter Lee Davis

unread,
May 1, 2018, 9:30:29 AM5/1/18
to rubyonra...@googlegroups.com
What happens if you run the `bundle` command in your project? Is the mysql2 gem installed?

Walter
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ec6d9b5d-eed8-4c47-aefe-d64beca83ebf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Abdelmajid Lotfi

unread,
May 1, 2018, 9:35:27 AM5/1/18
to rubyonra...@googlegroups.com
I got this :

 bundle
Using rake 12.3.1
Using concurrent-ruby 1.0.5
Using i18n 1.0.1
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.1.6
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Using nokogiri 1.8.2 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.2
Using rails-html-sanitizer 1.0.4
Using actionview 5.1.6
Using rack 2.0.5
Using rack-test 1.0.0
Using actionpack 5.1.6
Using nio4r 2.3.0
Using websocket-extensions 0.1.3
Using websocket-driver 0.6.5
Using actioncable 5.1.6
Using globalid 0.4.1
Using activejob 5.1.6
Using mini_mime 1.0.0
Using mail 2.7.0
Using actionmailer 5.1.6
Using activemodel 5.1.6
Using arel 8.0.0
Using activerecord 5.1.6
Using public_suffix 3.0.2
Using addressable 2.5.2
Using bindex 0.5.0
Using bundler 1.16.1
Using byebug 10.0.2
Using xpath 3.0.0
Using capybara 2.18.0
Using ffi 1.9.23 (x64-mingw32)
Using childprocess 0.9.0
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using coffee-script 2.4.1
Using method_source 0.9.0
Using thor 0.20.0
Using railties 5.1.6
Using coffee-rails 4.2.2
Using multi_json 1.13.1
Using jbuilder 2.7.0
Using mysql2 0.4.10 (x64-mingw32)
Using puma 3.11.4
Using sprockets 3.7.1
Using sprockets-rails 3.2.1
Using rails 5.1.6
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using rubyzip 1.2.1
Using sass-listen 4.0.0
Using sass 3.5.6
Using tilt 2.0.8
Using sass-rails 5.0.7
Using selenium-webdriver 3.11.0
Using turbolinks-source 5.1.0
Using turbolinks 5.1.1
Using tzinfo-data 1.2018.4
Using uglifier 4.1.10
Using web-console 3.6.2
Bundle complete! 13 Gemfile dependencies, 67 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

On Tue, May 1, 2018 at 9:29 AM, Walter Lee Davis <wa...@wdstudio.com> wrote:
What happens if you run the `bundle` command in your project? Is the mysql2 gem installed?

Walter

> On May 1, 2018, at 9:22 AM, Majid Lotfi <akra...@gmail.com> wrote:
>
> Hi,
> I am following lynda training in my windows 7, I don't know what cause this error :
>
>  rake db:schema:dump
>
> rake aborted!
> LoadError: cannot load such file -- mysql2/2.4/mysql2
> C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
> C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/Rakefile:4:in `require_relative'
> C:/majid/projTutorials/Lynda/rails/Sites/simple_cms/Rakefile:4:in `<top (required)>'
> (See full trace by running task with --trace)
>
> Thanks, your help is appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3E669D37-00B6-46ED-967F-DFF1F2F78459%40wdstudio.com.

fugee ohu

unread,
May 3, 2018, 10:09:13 AM5/3/18
to Ruby on Rails: Talk
Did you solve this yet? That seems an odd version of the mysql2 gem, I went from using 0.3.2 to using 0.4.5 with no stops in between What did you set as the database adapter in config/database.yml ?
 

Abdelmajid Lotfi

unread,
May 6, 2018, 12:07:37 PM5/6/18
to rubyonra...@googlegroups.com
No, 
I am still waiting for a solution, I am new here how did you upgrade it from 0.3 to 0.4 ?
Thanks,

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.

Hassan Schroeder

unread,
May 6, 2018, 2:09:39 PM5/6/18
to rubyonrails-talk
On Sun, May 6, 2018 at 9:07 AM, Abdelmajid Lotfi <akra...@gmail.com> wrote:

> I am still waiting for a solution, I am new here how did you upgrade it from
> 0.3 to 0.4 ?

$ gem list --remote mysql2 | grep -e '^mysql2 '
mysql2 (0.5.1 ruby x64-mingw32 x86-mingw32 x86-mswin32-60)

You might want to upgrade to the latest version rather than just 0.4.x
but in any case --

To upgrade you can

1) run `bundle update` (see: `bundle help update`), or

2) specify the version you want in your Gemfile and `bundle install`.

HTH!

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Abdelmajid Lotfi

unread,
May 7, 2018, 12:37:46 PM5/7/18
to rubyonra...@googlegroups.com
 gem list --remote mysql2 | grep -e '^mysql2'
activerecord-mysql2-adapter (0.0.3)
activerecord-mysql2-retry-ext (0.2.0)
activerecord-mysql2legacydb-adapter (0.2.0)
activerecord-mysql2rgeo-adapter (2.2.0)
activerecord-mysql2spatial-adapter (0.5.2)
activerecord-pedantmysql2-adapter (1.1.3)
benhutton-mysql2psql (0.2.2)
em_mysql2_connection_pool (0.0.7)
ghazel-mysql2 (0.2.6.3)
glimpse-mysql2 (1.1.0)
mysql2 (0.5.1 ruby x64-mingw32 x86-mingw32 x86-mswin32-60)
mysql2-client-general_log (0.2.1)
mysql2-client-general_logs (0.1.0)
mysql2-cs-bind (0.0.6)
mysql2-metrics (0.0.1)
mysql2-reconnect_with_readonly (0.2.0)
mysql2-sp (0.3.10)
mysql2_bigint (0.2.6.1)
mysql2_downcase (0.0.3)
mysql2_model (0.1.2)
mysql2_query_filter (0.1.1)
mysql2_query_filter-plugin-casual_log (0.1.1)
mysql2_query_filter-plugin-log (0.1.1)
mysql2_wrapper (0.0.1)
mysql2json (0.0.4)
mysql2json_es (0.0.1)
mysql2mysql (0.0.2)
mysql2psql (0.1.0)
mysql2wrapper (0.0.2)
mysql2xxxx (0.2.1)
patriot-mysql2-client (0.7.0)
peek-mysql2 (1.2.0)
rdp-mysql2 (0.2.7.1)
sequel-em_mysql2 (0.1.0)
solaris-mysql2 (0.3.11)
xmysql2psql (0.2.1)


Does :   mysql2 (0.5.1 ruby x64-mingw32 x86-mingw32 x86-mswin32-60) 
mean I have the latest one ?
thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.

Hassan Schroeder

unread,
May 7, 2018, 8:49:06 PM5/7/18
to rubyonrails-talk
On Mon, May 7, 2018 at 9:37 AM, Abdelmajid Lotfi <akra...@gmail.com> wrote:
> gem list --remote mysql2 | grep -e '^mysql2'

Note: if you put a space at the end of 'mysql2 ' you'll only get

> mysql2 (0.5.1 ruby x64-mingw32 x86-mingw32 x86-mswin32-60)

> Does : mysql2 (0.5.1 ruby x64-mingw32 x86-mingw32 x86-mswin32-60)
> mean I have the latest one ?

No, it means 0.5.1 is the latest released version.

What you have on your system is `gem list --local mysql2`
Reply all
Reply to author
Forward
0 new messages