- 博客(10)
- 资源 (2)
- 收藏
- 关注
原创 rails3.1 rake 报错 uninitialized constant rake::dsl
这个问题碰到3次了,因此记录一下 rake 命令报错: uninitialized constant rake::dsl 原因是rails 3.1.0 和 rake 1.3.2的版本不兼容 暂时解决办法,把rake 降低到0.9.2 gem install rake -v=0.9.2 ...
2011-09-02 16:09:36 132
原创 how to install mysql2 gem on windows/mingw32
Run the command – ‘gem install mysql2′ Got the following error- D:\DEVKIT_INSTALL_DIR>gem install mysql2 Temporarily enhancing PATH to include DevKit… Building native extensions. This coul...
2011-09-01 20:15:55 128
原创 rails3 session配置
Use the database for sessions instead of the cookie-based default, which shouldn't be used to store highly confidential information Create the session table with [code="ruby"] 1.rake db:ses...
2011-08-01 12:50:28 92
原创 no such file to load — openssl
no such file to load -- openssl This error occurred while loading the following files: openssl Are you using RVM? If so you may want to reinstall ruby with the location of your openssl ins...
2011-07-26 10:55:44 121
原创 bundle install无法成功安装mysql2
bundle install无法成功安装mysql2 应该是缺少了一个必要的文件!!! 有一种好轻松的解决办法, 就是先再gemfile 里先gem 'mysql'然后bundle install 这样能安装成功,也把必要的文件也安装了 然后再把gemfile里的gem 'mysql'改成gem 'mysql2' 最后安装成功...
2011-07-13 19:09:29 374
原创 用scaffold_controller为已存在的model生成具有CRUD的controller
rails g scaffold_controller model_name 如果目录分层 rails g scaffold_controller module/model_name
2011-07-03 17:06:10 165
原创 把控制器(controller)分组到模块中
现在,我们的所有的controller都放在app/controller目录下,有时候我们的controller可能比较多,为了不污染到顶层的命名空间(namespace),我们可以选择将某几个controller归组到一个单独的命名空间里。 对此,Rails有一个简单的约定,如果一个请求(request)包括了controller的名字,例如:admin/book,Rails会在app/c...
2011-07-03 17:02:26 479
原创 Rake提示uninitialized constant Rake::DSL解决办法
环境:Ruby 1.9.1/Rails 3.0.9/Rake 0.9.2 在运行rake db:create的时候提示 [code="ruby"]1.rake aborted! 2.uninitialized constant Rake::DSL 3./usr/local/ruby/lib/ruby/1.9.1/rake.rb:2482:in `const_missing' ...
2011-07-03 16:59:54 166
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人