issues with Spree

后端 未结 4 1926
遇见更好的自我
遇见更好的自我 2021-02-11 11:14

I am trying to install and run Spree on my local machine by following the steps mentioned in Getting started with Spree

However, when I start the server I get the follow

相关标签:
4条回答
  • 2021-02-11 11:30

    Here is what I did to get Spree up and running:

    Create a new rails project:

    $ rails new spree_project
    

    Add these 5 gems to the projects Gemfile (/spree_project/Gemfile):

    gem 'spree', :git => 'git://github.com/spree/spree.git'
    gem 'spree_auth_devise', :git => 'git://github.com/spree/spree_auth_devise'
    gem 'spree_gateway', :git => 'git://github.com/spree/spree_gateway.git'
    gem 'spree_usa_epay'
    gem 'spree_skrill'
    

    Run a bundle install and setup the database (rake db:bootstrap did not work for me)

    $ bundle install
    $ rake db:migrate
    $ rake db:seed
    $ bundle exec rake spree_sample:load
    
    0 讨论(0)
  • 2021-02-11 11:37

    Solved the issue!

    Generated the following generators: spree_static_content and spree_product_assembly which did the magic!

    0 讨论(0)
  • 2021-02-11 11:44

    Could not find table 'pages' means rails is not being able to find that table in the database.

    In those instructions, review the section 'configuring the database' and then '4.6 Populating the Database'.

    It sounds like you want to give spree a go, but don't have experience with Rails. The spot where you are stuck is not something specific to spree, its a step required in setting up all rails projects referred to as database migration.

    For what you need to know about migrations the official Rails Guides are great. http://guides.rubyonrails.org/migrations.html

    For a comprehensive intro to Rails which may also answer a few of your other questions, check out http://railstutorial.org/ruby-on-rails-tutorial-book

    If you just want to try stuff.. the spree tute is on track Do these steps again.. (If it generates an error, to a rake db:drop first to get rid of what you have already done)

    • rake db:create
    • rails g spree:site
    • rake spree:install
    • rake spree_sample:install
    • rake db:bootstrap
    • rake db:migrate
    • rake db:seed
    • rake db:sample
    • rake db:admin:create
    0 讨论(0)
  • 2021-02-11 11:50

    The 'pages' table is used by the spree_static_content gem. You can either remove the gem from your gemfile, or you can generate migrations for the static content gem:

    rails generate spree_static_content:install
    

    If you've included the 'spree_product_assembly' gem as well, you'll want to do the same for it:

    rails generate spree_product_assembly:install
    

    Then, reset the database (just to make sure)

    rake db:bootstrap
    rake db:admin:create
    

    I ran into similar issues after trying the http://spreecommerce.com/documentation/getting_started.html instructions, but it seems to have created a nice demo app after taking these additional steps.

    0 讨论(0)
提交回复
热议问题