AlchemyCMS / alchemy_cms

Alchemy is the Open Source Rails CMS framework for the component based web that can be used as classic server side rendered or headless CMS.
https://www.alchemy-cms.com
BSD 3-Clause "New" or "Revised" License
846 stars 315 forks source link

Upgrading from 2.3 to 2.7.2 #469

Closed sectore closed 10 years ago

sectore commented 10 years ago

While upgrading an existing app from 2.3 to 2.7.1 (or 2.7.2 ) I have had few issues with the new structure of the database. It seems, that the structure of the current database is not been upgraded using bundle exec rake alchemy:upgrade

Is there a way or workaround to avoid errors such as Table 'alchemy_sites' doesn't exist or Unknown column alchemy_languages.site_id?

Thanks!

-Jens

robinboening commented 10 years ago

Hi Jens

when executing the upgrade task, can you see the migrations running? Do you get any errors from the task?

Independent of that, you should upgrade in steps, from 2.3 to 2.4 to 2.5, ... up to 2.7

Did you do that? If not, that might be the issue.

Cheers

Robin

On 17.02.2014, at 14:29, Jens Krause notifications@github.com wrote:

While upgrading an existing app from 2.3 to 2.7.1 (or 2.7.2 ) I have had few issues with the new structure of the database. It seems, that the structure of the current database is not been upgraded using bundle exec rake alchemy:upgrade

Is there a way or workaround to avoid errors such as Table 'alchemy_sites' doesn't exist or Unknown column alchemy_languages.site_id?

Thanks!

-Jens

— Reply to this email directly or view it on GitHub.

sectore commented 10 years ago

Hi Robin,

there are no errors running the tasks, just a rake aborted! I will try to upgrade Alchemy step by step - as you mentioned before.

Thanks ;)

-Jens

sectore commented 10 years ago

Here are my steps upgrading Alchemy:

/Users/jens/.rvm/gems/ruby-1.9.3-p448@XXXXXXXXXXX/gems/alchemy-richmedia-essences-0.0.1/lib/alchemy-richmedia-essences/engine.rb:9:in `block in class:Engine': uninitialized constant Alchemy::AuthEngine (NameError)

It seems that alchemy-richmedia-essences has some issues with latest Alchemy.

Is there a way to fix it? Unfortunately the project needs the alchemy-richmedia-essences gem...

-Jens

robinboening commented 10 years ago

It needs to be Alchemy::Auth::Engine

We should make a new release of alchemy-richmedia-essences that works with Alchemy 2.7.

I am on the train right now, so I cant do it now - but maybe later or tomorrow.

On 18.02.2014, at 18:49, Jens Krause notifications@github.com wrote:

Here are my steps upgrading Alchemy:

2.3 to 2.4 OK 2.4 to 2.5 OK 2.5 to 2.6 OK 2.6. to 2.6.1 OK 2.6.1 to 2.6.2.1 OK 2.6.2.1 to 2.7.0 ERROR /Users/jens/.rvm/gems/ruby-1.9.3-p448@XXXXXXXXXXX/gems/alchemy-richmedia-essences-0.0.1/lib/alchemy-richmedia-essences/engine.rb:9:in `block in class:Engine': uninitialized constant Alchemy::AuthEngine (NameError)

It seems that alchemy-richmedia-essences has some issues with latest Alchemy.

Is there a way to fix it? Unfortunately the project needs the alchemy-richmedia-essences gem...

-Jens

— Reply to this email directly or view it on GitHub.

sectore commented 10 years ago

Thanks Robin! Let me open an issue for this task ;)

-Jens

tvdeyen commented 10 years ago

I'll have a look into it now.

tvdeyen commented 10 years ago

Fixed the issues with rich media essences 9ea22f5275331162aacf84963fb5e65550acfdbf

sectore commented 10 years ago

@tvdeyen Thanks! The rich media essences has been fixed :)

Now I run into another error upgrading from 2.6.2.1 to 2.7.0 (or to 2.7.2) if I open the /admin/ page:

ActionView::Template::Error (private method `select' called for nil:NilClass
  (in /Users/jens/.rvm/gems/ruby-1.9.3-p448@XXXXXXX/gems/alchemy_cms-2.7.2/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee.erb)):
    22:       Alchemy.current_url = '<%= url_for.html_safe %>';
    23: 
    24:     </script>
    25:     <%= javascript_include_tag('alchemy/alchemy') %>
    26:     <%= yield :javascript_includes %>
    27:   </head>
    28:   <body id="alchemy" class="<%= body_class %>">
  alchemy_cms (2.7.2) lib/alchemy/tinymce.rb:57:in `block in content_definitions_from_elements'

- :encryptable is activated within config.yml. Also gem devise-encryptable is added to Gemfile. The project is running with Rails 3.2.16 and Devise 2.2.8

Any idea?

-Jens

tvdeyen commented 10 years ago

It seams you having an element in your elements.yml file that has a contents key with no entries. Can you share your elements.yml file?

I will submit a patch that will fix the error, if one has an empty contents collection.

sectore commented 10 years ago

Thanks Thomas! Yep, an empty contents element causes this issue. I have removed it and now everything works like a charm. The project is updated to v.2.7.2 without any issues now :)

Thanks again guys for your great support - it is just awesome!

-Jens

tvdeyen commented 10 years ago

Glad to here that it's working now.

PS: We are planning to relaunch the http://alchemy-cms.com website do you have some projects you want to share in the showcase section?