我想通过从3迁移到3.1来帮助一个开源项目
但我以前从未迁移过大型项目,所以我正在寻找一些建议?
这就是项目-https://github.com/locomotivecms/engine
谢谢,亚历克斯
我想通过从3迁移到3.1来帮助一个开源项目
但我以前从未迁移过大型项目,所以我正在寻找一些建议?
这就是项目-https://github.com/locomotivecms/engine
谢谢,亚历克斯
在这里,它是一个“几乎可以工作”的momotivecms代码,在轨道3.1上迁移:
https://github.com/lgs/engine/tree/rails-3.1
…它还没有准备好接受拉取请求,
infact it miss to replace /images/ whith /assets/ in all the relative path ..., anyway it start and stay up (despite many "DEPRECATION WARNING"), on rails 3.1 server:
lsoave@ubuntu:~/rails/github/engine$ rails s
DEPRECATION WARNING: config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
=> Booting WEBrick
=> Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-06-22 01:54:34] INFO WEBrick 1.3.1
[2011-06-22 01:54:34] INFO ruby 1.9.2 (2010-12-25) [i686-linux]
[2011-06-22 01:54:34] INFO WEBrick::HTTPServer#start: pid=2948 port=3000
Rails控制台也运行良好:
lsoave@ubuntu:~/rails/github/engine$ rails c
DEPRECATION WARNING: config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
Loading development environment (Rails 3.1.0.rc4)
ruby-1.9.2-p136 :001 >
这是我在尝试过程中遵循的指南:
http://davidjrice.co.uk/2011/05/25/how-to-upgrade-a-rails-application-to-version-3-1-0.html
UPDATE: "Cannot modify SafeBuffer in place" error resolved
UPDATE jun 23 11: resolved "ArgumentError (wrong number of arguments (4 for 3))" adding options param (the fourth) to set_session into lib/locomotive/session_store.rb b/lib/locomotive/session_store.rb Thanks to Nicholas Hubbard previous answer.
从GitHub重新发布:
It looks like the new sessions in 3.1 require 4 params: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb Line 61
def set_session(env、sid、session_data、options)
The store in locomotive only takes three: https://github.com/lgs/engine/blob/rails-3.1/lib/locomotive/session_store.rb Line 31 def set_session(env, sid, session_data)
看起来选项也在通过,这是我们没有预料到的。
How can I get it to return the time without changing when I refresh the page (example: it s 12:02, I refresh the page at 12:05 and 12:02 is not saved, 12:05 appears) def change create_table :...
Now that Rails 3 beta is out, I thought I d have a look at rewriting an app I have just started work on in Rails 3 beta, both to get a feel for it and get a bit of a head-start. The app uses MongoDB ...
Now that the Rails 3 beta is here, let s take a little straw poll. Please tell us briefly what your application does and when you will upgrade it to Rails 3. Or, if you re not planning on upgrading ...
It can be traced back to config/boot.rb, line 7: require rubygems require bundler Bundler.setup This is with Bundler 0.8.1 supposedly installed: ../Users/ashley$ sudo gem install bundler ...
I have been having a problem with using Bundler and being able to access my gems without having to require them somewhere, as config.gem used to do that for me (as far as I know). In my Rails 3 app, I ...
I have a model that, when it instantiates an object, also creates another object with the same user id. class Foo > ActiveRecord::Base after_create: create_bar private def create_bar Bar....
So Rails and Merb are sort of merging in Rails 3.0? Thats how its been described to me anyway. This means that a lot of what made Rails, Rails will now be moved to plug-ins so that it can be more ...
I m so used to oracle where you can simply concat(field1, , field2) but if I m using activerecord to find the field1 and field2, and I need a space in between, how do I accomplish this? Cheers ...