• #6楼 @alucardpj 谢谢,后来安装了 1 。mysql Ver 14.14 Distrib 5.5.44, for debian-linux-gnu (x86_64) using readline 6.3 (测试了,可以进数据库) 2。Gemfile里面有 gem 'mysql2' 。 显示: source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '3.2.21' gem 'mysql2'

    3。做了bundle install 。 4。改了database.yml 显示: development: adapter: mysql2 encoding: utf8 database: ryeboy_dev pool: 5 username: root password: zhaoyan min_messages: warning host: localhost

    5。rake db :setup 6。还是显示错误: rake aborted! NoMethodError: undefined method `declare' for Sass::Script::Functions:Module 7。在config.ru 里增加了:require 'sass' 8,然后还是不行,还是上面的错误,,,菜鸟晕死了,,, 求大神!!!

  • #1楼 @alucardpj 你好,我按教的方法 ,直接把database.yml.sqlite重命名为database.yml,放到config目录下面,然后db:setup 现在报错

    
    

    hao@zhao:~/app/ryeboy$ rake db :setup rake aborted! LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/mysql2-0.3.16/lib/mysql2/mysql2.so /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/mysql2-0.3.16/lib/mysql2.rb:8:in require' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/mysql2-0.3.16/lib/mysql2.rb:8:in' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in require' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:inblock (2 levels) in require' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in each' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:inblock in require' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in each' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:inrequire' /home/zhao/.rvm/gems/ruby-2.0.0-p643/gems/bundler-1.10.6/lib/bundler.rb:134:in require' /home/zhao/app/ryeboy/config/application.rb:13:in' /home/zhao/app/ryeboy/Rakefile:5:in require' /home/zhao/app/ryeboy/Rakefile:5:in' /home/zhao/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in eval' /home/zhao/.rvm/gems/ruby-2.0.0-p643/bin/ruby_executable_hooks:15:in

    ' (See full trace by running task with --trace)

    报错好像路径不对,而且还是直接去找的mysql2 不知道怎么办?另外是不是学习这些最好是翻墙用谷歌?谢谢

  • #1楼 @alucardpj 万分感谢! :plus1:

  • 《提问的智慧》 at 2015年08月26日

    新手学习了,授人以渔,俺需要慢慢培养问题处理能力!特别是英语的水平了!