spree install errors - ruby-on-rails-3

i am following the guide at http://guides.spreecommerce.com/getting_started.html
all's ok until i run
bundle exec rake spree_sample:load
rake says
Don't know how to build task 'spree_sample:load'
if i decide to skip that and do
rake db:bootstrap
it says
Table 'myproject_development.countries' doesn't exist
if alternatively i run
rake db:migrate
rake db:seed
rake spree_sample:load
it also says
Don't know how to build task 'spree_sample:load'
if i still continue that and run
rake db:admin:create
i get another error:
no such file to load -- /home/pavel/cetsy/db/sample/users.rb
bundler information:
...
Using rails (3.0.9)
...
Using spree_core (0.60.1)
Using spree_auth (0.60.1)
Using spree_api (0.60.1)
Using spree_dash (0.60.1)
Using spree_promo (0.60.1)
Using spree_sample (0.60.1)
Using spree (0.60.1)

Simon was right, upgrading rails and spree to 3.1.1/0.70 partially solved the issue
now, running
bundle exec rake spree_sample:load
still produces
Don't know how to build task 'spree_sample:load'
but skipping this step lets me finish installing spree without other problems

Related

no such file to load -- pg unable to run migrations manually

I am using pg for dev and test in local machine only
its in dev and test group out in gemfile
group :development, :test do
gem 'pg'
end
rails version is
Rails 3.0.19
ruby 1.8.7
I used moonshine or shorter cut of capistrano
capistrano:deploy
the migrations file can't be migrated using capistrano, throws an error.
I am trying to run migrations manually inside server
bundle exec rake db:migrate VERSION=20140205173759_add_hebrew_to_piles.rb
I have three files and wanted to run rake migrate on each one (got it from stackoverlow, rails run specific migration)
and got
no such file to load -- pg
I am using mysql as production database so I don't understand why is looking for pg inside my server? any help?

Getting Rails working with a JS runtime environment

I'm using Ubuntu 11.10 and the terminal to install and run Rails. Here
is the process I've taken so far to setup Rails:
download and install Ruby 1.9.2 and Rails 3.1.0
-- I did this using sudo apt-get ruby1.9.1 and sudo gem install
rails
I made a new rails app using rails new path/to/app
I went to the new app directory and tried running rails server and got an
error about not having a JS ruby environment
I had to get a JS runtime environment for execjs so I downloaded 'therubyracer'
as well as 'therubyrhino' and added them to my gem file, one at a time like this:
gem
'therubyracer' then ran bundle install
After everything was successful with the install, I ran rails server again
-- with both runtime environments I have had similar errors:
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
Could not find therubyrhino-1.73.0 in any of the sources
Run `bundle install` to install missing gems.
Bundle knows where these programs live, giving correct pathnames when I
enter bundle show libv8 or bundle show therubyrhino. They are both
in /usr/lib/ruby/gems/1.9.1/gems/_ where all the other gems are
located for the bundle install.
Does anyone know where this exception is coming up in the Rails source
code? Does anyone know how Rails is gathering the gems? Better yet,
anyone had this problem and know how to fix it?
Thanks so much,
Feav
Have you tried starting the server using bundle exec rails server?
This problem has been fixed in a newer version of Rails.

How to run all migrations in reverse in rails 3.1

I want to run rake db:migrate:down on all of my migrations in rails 3.1. Some other questions suggest doing rake db:migrate:down VERSION=0, but that gives me this error:
No migration with version number 0
Use rake db:migrate VERSION=0

After Rails 3 upgrade rake db:test:prepare not working?

I have just gone through the process of upgrading a Rails 2.3.11 app that uses Test Unit to Rails 3.1.rc4 and I have now set up rspec-rails 2.6.1.
I also switch the test connection in database.yml to use sqlite instead of postgres.
I can run rake db:migrate and db:test:prepare all day, but in my model tests I get "Could not find table 'model_name'".
Has anyone else ran into this?
I did encounter this before. Try rebuilding it from scratch:
rake db:drop RAILS_ENV=test
rake db:create RAILS_ENV=test
rake db:migrate RAILS_ENV=test
What does select * from schema_migrations show you? Verify that the migrations you expect have all actually been stored. If you know which migration failed you can use rake db:migrate:redo VERSION=<VERSION>
Apologies for not being a comment. StackOverflow's "can't comment until 50" policy seems a bit backwards :)

Rails 3.1 engine rake task doesnt work

I created a new engine with Rails 3.1.rc1
➜ (ruby-1.9.2-p180#rails3-pre) rails git:(master) be bin/rails plugin new ../first_engine --mountable
rails g scaffold project title:string
Scaffold is generated and now when I run
bundle exec rake db:migrate
I get the following error:
rake aborted!
Don't know how to build task 'app:db:migrate'
Tasks: TOP => db:migrate
Before rc1, it was working. But what happened now? I couldn't figure it out!
Here is the gist with all the steps and backtraces https://gist.github.com/990641
Can anyone put me the right direction?
In you Gemfile or RVM Global Gemset file. Change rake to include the version. e.g.
gem 'rake', '0.8.7'
Just using rake will not work until Rails comes out with a fix. Let us know how you get on. All the best.