flatronka
flatronka

Reputation: 1081

Ruby on rails where is the real issue?

After 2 years I want to working with ruby on rails again, I've tried to start my project again, but it wasn't working, I followed my instructions what I written 2 years ago. I think the application has some dependency problem or I don't know, can you give some advice how I can find the source of the problem, I have tried the google.

I've tried:

bundle update
bundle install
rake db:create
bundle pack
rake install

I got the following error when I am using rake db:create or other rake commands:

    WARNING: Cucumber-rails required outside of env.rb.  The rest of loading is being defered until env.rb is called.
  To avoid this warning, move 'gem cucumber-rails' under only group :test in your Gemfile
rake aborted!
no such file to load -- rspec
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/bundler/gems/rspec-rails-matchers-488d2cadcd9f/lib/rspec-rails-matchers.rb:1:in `<top (required)>'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/elemer/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/elemer/railsapp/newest/railsapp/config/application.rb:7:in `<top (required)>'
/home/elemer/railsapp/newest/railsapp/Rakefile:4:in `require'
/home/elemer/railsapp/newest/railsapp/Rakefile:4:in `<top (required)>'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/elemer/railsapp/newest/railsapp/rails/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/home/elemer/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `eval'
/home/elemer/.rvm/gems/ruby-1.9.2-p320/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

If you have some ideas please share with me. Thank you.

My gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.9'
gem 'rake'
# Bundle edge Rails instead:
# gm 'rails', :git => 'git://github.com/rails/rails.git'

#gem 'sqlite3-ruby', :require => 'sqlite3'
gem "cancan"
gem 'racc'
gem 'jquery-rails'
gem 'paperclip', '2.3.8'
gem 'workflow'
gem 'pg'
gem 'prawn' # for pdf creation
gem 'yaml_db'
gem 'net-ldap'
gem 'whenever', :require => false
gem 'zip'
gem "bcrypt-ruby", :require => "bcrypt"
gem 'kaminari'
gem 'remotipart'
gem 'meta_where' 
gem 'meta_search'
gem 'delayed_job'
gem 'rack-ssl', :require => 'rack/ssl'
gem 'dalli'
#gem 'silent-postgres'
# Use unicorn as the web server

# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end
group :cucumber, :test, :development do
  gem "autotest"
  gem 'cucumber'
  gem 'cucumber-rails'
  gem 'rspec-rails', '~> 2.4'
  gem 'sqlite3'
  gem 'silent-postgres'
  gem 'selenium-webdriver'
  gem "bermuda"
  gem 'capybara', '1.1.1'
  gem 'rspec-rails-matchers', :git => "http://github.com/afcapel/rspec-rails-matchers.git"
  gem 'simplecov'
  gem 'simplecov-rcov'
  gem 'launchy'
  gem 'factory_girl', '2.1.0'
  gem 'factory_girl_rails', '1.2.0'
  gem 'database_cleaner'
end

Upvotes: 0

Views: 121

Answers (1)

Martin
Martin

Reputation: 7723

The answer in is the message. As per your Gemfile, cucumber is in both the :development and :test group. It should be only in the :test group.

group :cucumber, :test, :development do
  gem "autotest"
  gem 'cucumber'

Upvotes: 1

Related Questions