今儿把很古老的Rails1.2.6升级到了2.2.2,还好做了很充分的心理准备,呵呵,果然出了很多错误~
先说说升级的步骤吧~
1、卸载Rails1.2.6
gem uninstall rails
然后安装新的Rails,由于是最新版本,所以不用加版本号,直接输入
gem install rails
耐心等待……
2、更新gem
gem update --system
3、Rails2.2.2已经把Mysql驱动默认移除了,所以还需要手动安装Mysql驱动
gem install mysql
Mysql安装过程中,文档安装可能会出现错误,但是不影响好像……
4、进入到已经存在的Rails项目的文件夹中,修改config/environment/development.rb,注释掉以下两行
config.action_view.cache_template_extensions= false
config.breakpoint_server = true
不然会出现错误!
5、执行rake rails:update把现有Rails项目的配置文件更新为目前的Rails版本
6、现在如果运行服务器的话,会出现
998: 内存分配访问无效。 - c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so
这个错误,上网查询,说需要把libmysql.dll文件复制到c:/ruby/bin目录下,但是我从自己安装的Mysql里面找到的这个文件还不能解决问题,必须要用InstantRails里面的libmysql.dll文件,很是诧异呃,这个文件在这里下载(附件里面就是):
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/
至此,运行服务器,大功告成了~以前在1.2.6上面的项目又完美运行咯~
分享到:
相关推荐
Updating to Oracle Solaris 11.3-8
Oracle Solaris 11.2 Updating to Oracle Solaris 11.2-12
PATCH-更新系统是坚如磐石,专业,智能,清洁的解决方案,用于管理和分发游戏和应用程序的更新。 您的玩家最终可以毫无痛苦地更新您的游戏,而不必在新版本到来时再次下载整个游戏。这将为他们节省大量带宽和时间!...
Model updating有关使用实测数据修正有限元模型的资料
NULL 博文链接:https://wangtuoy.iteye.com/blog/662380
ATCH-更新系统是坚如磐石,专业,智能,清洁的解决方案,用于管理和分发游戏和应用程序的更新。 您的玩家最终可以轻松无忧地更新游戏,而无需在新版本到来时再次下载整个游戏。这将为他们节省大量带宽和时间!...
Myeclipse禁用updating indexes
版本更新,补丁,unity pc平台
Updating Your Form from Another Thread without Creating Delegates for Every Type of Update
3D GIS论文
Live Updating Operating Systems Using Virtualization Live Updating Operating Systems Using Virtualization
Topics whose treatment has been expanded include data types and domains, table comparisons, image relations, aggregate operators and summarization, view updating, and subqueries. A special feature of...
Part 2: Adding/Updating/Deleting Data Part 3: WPF Data Binding with LINQ to SQL These tutorials describe how to map your classes to your tables manually (rather than with an automated tool like ...
About the Authors xxxiii Introduction 1 Who Should Read This Book 1 Key Questions Answered in This Book 2 How This Book Is Structured 2 An Overview of Changes in This Edition 3 Development ...
Take your data access skills to the next level with Entity Framework About This Book Learn how to create, retrieve, update, and delete the data in a relational...Appendix: Answers to self-test questions
Though many updating schemes have been proposed to study such problem, few of them were carried out in a multigranulation environment. To fill such gap, the updating of the multigranulation rough ...
This third edition of John Zelle's Python Programming continues the tradition of updating the text to reflect new technologies while maintaining a time-tested approach to teaching introductory ...
This third edition of John Zelle's Python Programming continues the tradition of updating the text to reflect new technologies while maintaining a time-tested approach to teaching introductory ...
Unity的更新系统!
用智能计算基数更新有限元模型, Finite-Element-Model-Updating-Using-Computational-Intelligence-Techniques,资源来自互联网