Rails - Uninitialized Constant Gem::GemRunner Error
I'm using Gem 1.0.1 and Rails 1.2.6 that pre-installed by Mac OS X 10.5.2 (AKA Leopard). When I attempted to run rake rails:freeze:gems, I got this error:
uninitialized constant Gem::GemRunner
Since Gem version 0.9.5, gem_runner is not required automatically for the rake tasks. To solve this problem, just edit framework.rake file(For me, it is located in 'usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/tasks'.), and add the required line in the rails:freeze:gems task.
namespace :rails do
namespace :freeze do
desc "Lock this application to the current gems (by unpacking them into vendor/rails)"
task :gems do
deps = %w(actionpack activerecord actionmailer activesupport activeresource)
require 'rubygems'
require 'rubygems/gem_runner' #<---insert here
Gem.manage_gems
After that, *DO NOT* forget to remove the directory 'rails' in your project_dicectory/vendor/ before you try to freeze the rails again.
rm -rf project_directory/vendor/rails
Even when you finished all of these steps, you may still get error:
Freezing to the gems for Rails 1.2.6
ERROR: While executing gem ... (Gem::Exception)
Cannot load gem at [/Library/Ruby/Gems/1.8/cache/activesupport-1.4.4.gem]
This is because your Rails 1.2.6 was shipped with Leopard instead of installing it by gems, so there're no rails files in the cache directory. I didn't want to reinstall or upgrade the Rails, so my solution was use rake rails:freeze:edge like so:
rake rails:freeze:edge TAG=rel_1-2-6
The command will checkout the rails 1.2.6 from the remote repository to your local machine.
分享到:
相关推荐
rails_apps_composer, 一个 gem,为 Rails 启动应用程序创建 Rails 应用程序模板 Rails 应用编辑器 Rails 应用程序编辑器 gem 安装一个 命令行 工具来从"食谱"的Collection 组装 Rails 应用程序。"你可以使用 rails_...
opal-rails, 将 ruby 带到Opal的Rails Rails 绑定 蛋白石 Rails 用于蛋白石 ruby 引擎的 Rails 绑定。 ( 变更日志 )安装在你的Gemfile 中gem 'opal-rails'或者当你构建新的Rails 应用程序时:rails
rails-omniauth, 带有OmniAuth的Rails 5.0启动应用程序,用于身份验证 Rails 和 OmniAuthRails 5.0集成 Rails 和OmniAuth的示例应用程序。 使用第三方凭据( 如 Facebook 。Twitter 或者GitHub帐户) 提供认证的 ...
使用RSpec 测试Rails 程序.pdf
入门rails的第一个demo
breach-mitigation-rails, 使 Rails 应用程序更能抵御入侵和犯罪攻击 breach-mitigation-rails使 Rails 3和 4应用程序 LESS 容易受到入侵/犯罪攻击的攻击。 有关详细信息,请参阅 breachattack.com 。工作原理这里 ...
《Rails之道》按照Rails的各个子系统进行组织编排,分别介绍了Rails的环境、初始过程、配置和日志记录,Rails的分配器、控制器、页面生成和路由,REST、资源和Rails,ActiveRecord的基础、关联、验证和高级技巧,...
webpack-rails, 将 web pack与你的Ruby on Rails 应用程序集成 不再维护webpack-rails 不再被维护。 有关详细信息,请参阅 #90. web pack-railsweb pack 为你提供了将 web pack集成到现有的Ruby on Rails 应用程序中...
本章详细介绍Rails数据持久化技术ActiveRecord的使用,包括ORM与ActiveRecord的简介、建立数据表的映射、执行动态查询、插入数据、删除数据、表之间的关联,以及数据有效性验证等。 第11章 MVC的控制器层。本章...
rails_email_preview, 在 Rails 中,预览和编辑应用程序邮件程序模板 Rails 电子邮件预览 使用这里 Rails 引擎在浏览器中预览电子邮件。 兼容 Rails 4.2 。电子邮件审阅: 所有电子邮件预览的列表: 代表有两个主题...
Ruby核心团队成员Aaron Patterson完成了phuby,它可以在Rails应用下运行php应用程序。项目的地址在https://github.com /tenderlove/phuby,尽管项目主持人Aaron发布了几个视频去证明phuby能让php在Rails下运行,但...
knock, 用于 Rails API的无缝JWT身份验证 敲门 用于 Rails API的无缝JWT身份验证描述敲门是 Rails api的认证解决方案,基于JSON网络令牌的应用程序。什么是JSON网络令牌? :为什么要使用这里选项?它是轻量级的。它...
rails_layout, 为各种前端框架生成 Rails 应用程序布局文件 RailsLayout gem使用这里 gem 可以设置你选择的前端框架的布局文件:Zurb基础 5.3Bootstrap 4.0Bootstrap 3.3它还将为 Bootstrap 或者基础设置设计视图。...
在这个全球互联的世界中,计算机编程和 Web 应用程序开发都在迅猛发展,我很期待能为中国的开发者提供 Ruby on Rails 培训。学习英语这门世界语言是很重要的,但先通过母语学习往往会更有效果。正因为这样,当看到 ...
rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails ...
[Pragmatic Bookshelf] Crafting Rails Applications Expert Practices for Everyday Rails Development (E-Book) ☆ 图书概要:☆ Rails 3 is a huge step forward. You can now easily extend the framework, ...
Spring是Rails的预加载器。Spring 能够通过保持应用运行在后台,来提升开发模式下的速度。使得不需要在执行test,rake task以及migration时每次都加载。 标签:Spring
rails-devise, Rails 5.0启动应用程序,带有认证功能 Rails 和设计Rails 5.0示例应用程序提供身份验证和用户管理。设计用于用户管理和认证的插件Bootstrap 或者基金会的前端框架使用这里示例应用程序作为你自己的...
Ruby on Rails Guides v2 - Ruby on Rails 4.2.5