Skip to content

Commit

Permalink
Fix Gem::Package::TooLongFileName error.
Browse files Browse the repository at this point in the history
- Move blocks migrations to dummy app to fix Gem::Package::TooLongFileName error on gem building.
- Fix DestroyNoCmsPagesBlocks migration.
- Update readme.
  • Loading branch information
Luis Mendo committed Sep 11, 2015
1 parent 2442bd0 commit 271ea37
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ bundle install
And then import all the migrations:

```
rake no_cms_blocks:install:migrations
rake no_cms_pages:install:migrations
```

Expand Down
14 changes: 7 additions & 7 deletions db/migrate/20141211224348_destroy_no_cms_pages_blocks.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
class DestroyNoCmsPagesBlocks < ActiveRecord::Migration
def change

if !defined?(NoCms::Blocks::Block) || !NoCms::Blocks::Block.table_exists?
raise Exception.new("Migration destroying no_cms_pages_blocks should only be run after creating NoCms::Blocks::Block table")
if NoCms::Blocks::Block.table_exists?
begin
Rake::Task["no_cms:pages:migrate_blocks"].invoke
rescue
Rake::Task["app:no_cms:pages:migrate_blocks"].invoke
end
end

begin
Rake::Task["no_cms:pages:migrate_blocks"].invoke
rescue
Rake::Task["app:no_cms:pages:migrate_blocks"].invoke
end
drop_table :no_cms_pages_blocks

end
end
2 changes: 1 addition & 1 deletion spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20150909142454) do
ActiveRecord::Schema.define(version: 20150910163025) do

create_table "no_cms_blocks_block_translations", force: true do |t|
t.integer "no_cms_blocks_block_id"
Expand Down

0 comments on commit 271ea37

Please sign in to comment.