- 浏览: 1309111 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (732)
- Java_about (146)
- Spring_Hibernate_Struts_OpenSource (27)
- linux_unix (62)
- life_sth (22)
- js_css_html_xml_nodejs (69)
- design_pattens (1)
- Perl (8)
- php_ecshop (4)
- DB_Mysql_Oracle_Informix_SqlServer (43)
- JSTL (8)
- Testing_自动化测试 (42)
- DB_ID_UUID (4)
- SEM_SEO (1)
- english_study_improvement (4)
- SVN_Git (9)
- WebService_SOA_CloudComputing (3)
- E-Commerce (1)
- Lucene_Solr (7)
- others (2)
- Regex (2)
- tomcat_jetty (8)
- zeroc-ice (1)
- java_excel (5)
- ant_maven_gradle (5)
- Unity_VR_AR_C# (2)
- jmeter (1)
- XPath_dom4j (1)
- Ruby_and_Rails (68)
- write_a_rails (17)
- manage_and_team (1)
- getting_real (1)
- ubuntu (20)
- git_and_git_flow (7)
- TODO (1)
- PM_design (2)
- Python_and_Django (8)
- NoSql_mongo_redis (24)
- C/C++ (3)
- vi_vim_gvim (0)
- c#_.Net_windows编程_dll (10)
- Php_and_Yii (9)
- Android_IOS (31)
- Mysql (5)
- sa_运维_network_硬件 (37)
- lua (2)
- c_cpp_VisualStudio (21)
- 硬件-RM-Arduino (6)
最新评论
-
shenkun58:
...
NoClassDefFoundError: Could not initialize springframework.BeanCreationException -
liaojia1:
正解,感谢
NoClassDefFoundError: Could not initialize springframework.BeanCreationException -
flingfox63:
谢谢分享,电脑上有IPV6,导致了Guard启动不了……
ruby错误解决: Address family not supported by protocol - connect(2) -
c39274936:
s = "hello_world_ruby" ...
驼峰格式和下划线格式转换_translation between camel and snake format -
yfj300:
学习了学习了学习了学习了
硬盘基本知识(磁道、扇区、柱面、磁头数、簇、MBR、DBR)
相信不少同学在这里浪费时间了,我也是,好几个小时啊!!!
解决方法:
#1) myslq2的gem包问题,解决方法:
sudo apt-get install libmysqlclient-dev
参考:http://railsforum.com/viewtopic.php?id=40776
#2)rvm 1.9.2的问题, 根据rvm notes安装好需要的包后重新装ruby,参考我的上一篇 文章
错误:
lijg@lijg-desktop:~/workruby/helloapp$ ruby script/rails
Could not find gem 'mysql2 (>= 0)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
好啊,我就执行bundle吧,还是有错:
lijg@lijg-desktop:~/workruby/helloapp$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.3)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.0)
Using actionpack (3.1.0)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.29)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using ansi (1.3.0)
Using bundler (1.0.18)
Using coffee-script-source (1.1.2)
Using execjs (1.2.7)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.9.4)
Using thor (0.14.6)
Using railties (3.1.0)
Using coffee-rails (3.1.1)
Using jquery-rails (1.0.14)
Installing mysql2 (0.3.7) with native extensions
/home/lijg/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:552:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/lijg/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/lijg/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-mysql-config
--without-mysql-config
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mlib
--without-mlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-zlib
--without-zlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-socketlib
--without-socketlib
--with-mysqlclientlib
--without-mysqlclientlib
--with-nsllib
--without-nsllib
--with-mysqlclientlib
--without-mysqlclientlib
--with-mygcclib
--without-mygcclib
--with-mysqlclientlib
--without-mysqlclientlib
Gem files will remain installed in /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7 for inspection.
Results logged to /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/ext/mysql2/gem_make.out
from /home/lijg/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:530:in `block in build_extensions'
from /home/lijg/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `each'
from /home/lijg/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:505:in `build_extensions'
from /home/lijg/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in `install'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/source.rb:101:in `block in install'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/source.rb:91:in `install'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/installer.rb:57:in `block in run'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/installer.rb:49:in `run'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/installer.rb:8:in `install'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/cli.rb:220:in `install'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/vendor/thor/base.rb:386:in `start'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/bin/bundle:13:in `<top (required)>'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/bin/bundle:19:in `load'
from /home/lijg/.rvm/gems/ruby-1.9.2-p290/bin/bundle:19:in `<main>'
------------------------END EOF------------------------
E
N
D
+
E
O
F
------------------------END EOF------------------------
发表评论
-
ruby计算平方和开方_n次方n次幂
2022-06-28 21:52 647= = = ruby计算平方和开方 3 ** 2#= ... -
Ruby发送HTTP请求
2015-07-21 18:06 1164Ruby使用HTTP协议发送请求的方法备忘。 好像这 ... -
invalid byte sequence in GBK”问题 invalid byte sequence in UTF-8”问题
2015-07-03 15:11 2855碰见错误: test.rb:8:in `ma ... -
Ruby1.9之字符串内编码和外编码
2015-07-02 17:52 1278这里的文章很不错的么:Rubyist http://ru ... -
DevKit介绍和安装in railsInstaller
2015-05-26 17:01 2634DevKit介绍和安装in railsInstaller ... -
Rails_migrations中使用mysql的bigint
2014-09-30 14:32 1006From:http://rubyer.me/blog/468 ... -
Rails外如何启动rails的类自动加载_activates autoloading using ActiveSupport 3.x
2016-06-22 12:08 652The following cod ... -
如何在rails里打开gem里面的类_为何有时候不生效
2014-09-02 21:55 954在rails里面打开某个gem的类,补充一下等等,也 ... -
ruby的加载机制和rails_自动加载机制_对比
2014-09-02 16:51 1588prefer:http://urbanautomat ... -
Rails源码阅读(13)rails中的autoload和ruby的autoload
2014-07-30 17:13 1961Rails源码阅读(13)rails中的autoload和 ... -
Rails中命名路由的区别***_url与***_path
2014-07-29 16:37 1086Rails中命名路由的区别***_url与***_path ... -
ruby_gem安装_切换指定不同的源
2014-07-20 18:09 1155from:http://www.hiceon.com/to ... -
Ruby 的文件操作_不断总结
2014-07-11 11:55 1189一、用文件和目 ... -
Rails源码阅读(12)叫Rails的模块module_Rails常量使用
2014-07-02 09:35 1085The module nams "Rail ... -
注册邮件中的链接无host
2014-05-19 14:47 634在注册邮件中用命名路由的xxx_url不起作用,导致注 ... -
每个命令都有bundle exec的麻烦
2014-04-18 17:33 1429问题: 每次都得搞这个东西bundle exec放在 ... -
关于favicon.ico的报错:RoutingError
2014-03-31 14:45 1965错误: ActionController::Routin ... -
rbenv_安装太慢_解决办法
2014-03-31 13:51 2188rvm做了很多“不为人知”的事情,而且做的太 ... -
配置sunspot tomcat结合sunspot_rails
2014-02-26 10:58 898这个sunspot的东西还是有不少缺点的。 ht ... -
RubyOrRails_使用技巧_收集
2013-11-09 14:39 1081#link_to not working in sc ...
相关推荐
介绍插件,用于对记录进行排序(使用 gem)安装要启用rails_admin_acts_as_list,请将以下内容添加到您的Gemfile : gem 'rails_admin_acts_as_list'gem 'rails_admin' 重要提示: rails_admin_acts_as_list之前必须...
rails_best_practices rails_best_practices是用于检查Rails代码质量的代码度量工具。 它支持以下ORM / ODM: 活动记录 蒙古型 mongomapper 以及以下模板引擎: erb 哈姆 减肥 拉布尔 rails_best_practices...
rails_apps_composer, 一个 gem,为 Rails 启动应用程序创建 Rails 应用程序模板 Rails 应用编辑器 Rails 应用程序编辑器 gem 安装一个 命令行 工具来从"食谱"的Collection 组装 Rails 应用程序。"你可以使用 rails_...
Installation / 安装方式 via Rubygems gem install remove_emoji In your Gemfile: gem 'remove_emoji' , '~> 3.0.0' Usage / 使用方式 使用方式很简单,仅需要呼叫RemoveEmoji::Sanitize.call 递入你要过滤的...
安装将此行添加到您的应用程序的Gemfile中: gem 'rails_multisite'然后执行: $ bundle或将其自己安装为: $ gem install rails_multisite用法配置需要一个名为config/multisite.yml的文件,该文件指定所有数据库...
5. **Gemfile与Bundler**:管理Rails应用依赖的工具,通过Gemfile指定项目所需的库和版本,Bundler负责安装和管理这些依赖。 6. **Bootstrap**:Inspinia Admin基于Bootstrap,所以需要了解其栅格系统、组件和...
gem 'rails_admin_state' 然后执行: $ bundle 或将其自己安装为: $ gem install rails_admin_state 用法 添加状态操作: RailsAdmin.config do |config| config.actions do ...... state end end 将您...
gem 'vite_rails' 然后,运行: bundle install bin/rake vite:install 这将生成配置文件和示例设置。 上提供了其他安装说明。 入门 :laptop: 重新启动Rails服务器,然后运行bin / vite启动Vite开发服务器。
gem "mongoid_rails_migrations" 如何使用 创建迁移 $ rails generate mongoid:migration 运行迁移: $ rails db:migrate $ rails db:migrate:down VERSION= $ rails db:migrate:up VERSION= $ rails db:rollback...
默认引导程序3 rails_admin主题的现代替代。 它提供新闻颜色,调整和全新的树状视图菜单。 您可以将其派生并根据需要更改variables.scss ! 宝石文件 gem 'rails_admin_rollincode' , '~> 1.0' gem 'rails_admin'...
gem "globalize3" gem "rails_admin_globalize" 将 globalize 添加到 rails_admin 初始化程序中的操作列表: RailsAdmin . config do | config | config . actions do dashboard do ; end globalize do ; ...
在Rails应用中集成Open Flash Chart,首先需要在项目中添加对应的gem。在`Gemfile`中加入`open_flash_chart`,然后运行`bundle install`来安装。接下来,你需要了解如何构建图表对象和传递数据。Open Flash Chart...
gem 'rails_admin_enum4', github: 'sibext/rails_admin_enum4' bundle install 用法 通过生成器生成新模型: rails g model Sibext service:integer 执行迁移: rake db:migrate 将枚举添加到模型中: class ...
Rails Admin内容生成器 使用创建内容的简单方法。 预习 示范 要求 依存关系 MiniMagick 支持的ORM ActiveRecord 支持的资产插件 CarrierWave 安装 使用rails <5和TurboLink <5进行测试 将此行添加到您的...
安装将此行添加到应用程序的 Gemfile 中: gem 'rails_console_toolkit' 然后生成初始化程序: $ bin/rails generate rails_console_toolkit:install或手动编写: # config/initializers/console....
gem 'rails_admin_image_manager' 跑步 $ bundle install 安装RailsAdmin_ImageManager $ rails generate rails_admin_image_manager:install 将上传文件路径添加到您的.gitignore文件中 /public/rails_admin_...
rails_semantic_logger, Rails 语义记录器用语义记录器替换 Rails 缺省记录器 Rails 语义记录器 语义记录器用语义记录器替代 Rails 缺省记录器。http://github.com/rocketjob/rails_semantic_logger文档有关完整文档...
gem 'rails_admin_nested_set' 然后执行: $ bundle 或将其自己安装为: $ gem install rails_admin_nested_set 与rails_admin结合使用 为每个模型或仅为您需要的模型添加nested_set操作 RailsAdmin.config do...
安装要启用rails_admin_history_rollback ,请将以下内容添加到您的Gemfile确保将其添加到rails_admin之后: gem 'rails_admin'gem 'rails_admin_history_rollback' 不用说,此插件还需要paper_trail gem。 例如gem ...