Problem when running db:create

I have installed;

Ruby

ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

Rails 4.2.4

gem 2.5.0

MySQL

Phusion Passenger version 5.0.21

  • apache

But when I run “rake db:create --trace”

I get the following error

NoMethodError: undefined method `task’ for #Spec::Rake::SpecTask:0x007f3b57c8ef58

/home/lugala/apps/lib/tasks/rspec.rake:28:in `initialize’

/home/lugala/apps/lib/tasks/rspec.rake:58:in `new’

/home/lugala/apps/lib/tasks/rspec.rake:58:in `<top (required)>’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:658:in `load’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:658:in `block in run_tasks_blocks’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:658:in `each’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:658:in `run_tasks_blocks’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:452:in `run_tasks_blocks’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:453:in `load_tasks’

/home/lugala/apps/Rakefile:6:in `<top (required)>’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:77:in `block in run’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run’

/home/lugala/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>’

/home/lugala/.rbenv/versions/2.2.1/bin/rake:23:in `load’

/home/lugala/.rbenv/versions/2.2.1/bin/rake:23:in `’

Help please I am stuck here

Is this for a new rails app or have you picked up an app already written?

Colin

Dear Colin,

Thanks for your response,

I have picked app already written called Fedena ( http://www.projectfedena.org/ ) Regards,

Advo

  Dear Colin,   Thanks for your response,   I have picked app already written called Fedena ( http://www.projectfedena.org/ )

Have you kept the files Gemfile.lock and Gemfile *exactly* as they were in the version you picked up (which guarantees that you have the same versions of gems as the original)? Note that you must not run bundle update or that may update gem versions. You should just run bundle install. If you are in any doubt then restore Gemfile and Gemfile.lock and run bundle update.

By the way, I would prefer it if you could not top post, but insert you reply at the appropriate point(s) in the previous message. It makes it easier to follow the thread. Thanks.

Colin

Dear Colin,

Thanks but I think I hit a wrong button, this time I have pressed the top red POST REPLY button, hope it should be correct

Below are the procedures I followed in the installation process

[root@i-3781-9521-VM ~]# cp master projectfedena-projectfedena_v2.0-a213125.tar.gz
[root@i-3781-9521-VM ~]# rm master
[root@i-3781-9521-VM ~]# chmod 777 projectfedena-projectfedena_v2.0-a213125.tar.gz
[root@i-3781-9521-VM ~]# tar -xvf projectfedena-projectfedena_v2.0-a213125.tar.gz

I then changed the folder to apps instead of projectfedena-projectfedena_v2.0-a213125

At this point, still when I looked in apps folder, neither Gemfile.lock nor Gemfile where present, hence I decided to run

cd /apps

then

rails new apps

this generated neither Gemfile.lock and Gemfile files

Sorry in my last post, the last sentence I meant to say

this generated both Gemfile.lock and Gemfile

Dear Colin,

Thanks but I think I hit a wrong button, this time I have pressed the top red POST REPLY button, hope it should be correct

No, you have still posted at the top. You have to click the three little dots down at the bottom left of the window after clicking Reply, which will show the previous message. Then you can insert your new message at the appropriate point.

  Below are the procedures I followed in the installation process

[root@i-3781-9521-VM ~]# cp master projectfedena-projectfedena_v2.0-a213125.tar.gz [root@i-3781-9521-VM ~]# rm master [root@i-3781-9521-VM ~]# chmod 777 projectfedena-projectfedena_v2.0-a213125.tar.gz [root@i-3781-9521-VM ~]# tar -xvf projectfedena-projectfedena_v2.0-a213125.tar.gz

I then changed the folder to apps instead of projectfedena-projectfedena_v2.0-a213125 At this point, still when I looked in apps folder, neither Gemfile.lock nor Gemfile where present, hence I decided to run

In config/environment.rb does it specify RAILS_GEM_VERSION? If so what is it? If not then post environment.rb here.

Colin

Thank you Colin,

I have not been able to locate the three dots like how I see them in my gmail inbox browser

But now I have put the post at the bottom of the message, hope this will display correctly, if not them I am direct my messages to my inbox

then I will be replying from there.

In the config/environment.rb there is not RAILS_GEM_VERSION. but the only text I could find there are as follow below

# Load the Rails application.

require File.expand_path(‘…/application’, FILE)

# Initialize the Rails application.

Rails.application.initialize!

Many thanks

Advo

... I have not been able to locate the three dots like how I see them in my gmail inbox browser But now I have put the post at the bottom of the message, hope this will display correctly, if not them I am direct my messages to my inbox then I will be replying from there.

This is fine, thanks.

In the config/environment.rb there is not RAILS_GEM_VERSION. but the only text I could find there are as follow below

# Load the Rails application. require File.expand_path('../application', __FILE__)

# Initialize the Rails application. Rails.application.initialize!

Looking at config/environmet.rb at

there is a RAILS_GEM_VERSION, which says it needs rails 2.3. It seems from you earlier posts that you have picked up an even older version of fedena. However even rails 2.3 is way out of date and no longer supported, so this is a big problem.

Have you been following the instructions on http://projectfedena.org/install

Colin

Thanks Colin,

I can see a very huge difference on the environment.rb

I have been following this link for tutorial How To Install Ruby on Rails with rbenv on CentOS 7 | DigitalOcean

AND Fedena/Installation - Wikibooks, open books for an open world

Best regards,

Advo

Colin Law <clanlaw@gmail.com> writes:

So do you need any further help?

I should point out that you should not be using a rails 2.3 app on a public website, as it is no longer supported I am sure there will be security flaws. I presume that fedena is basically dead as it has not been upgraded.

Colin

Dear Colin, Thanks you for your support Yes I still need help, but I am reluctant to use Fedena if its no longer supported then it will be difficult for me. I will need to confirm first before I can proceed I will be back to you Thanks again Advo

You have to use ruby 1.8 and rails 2.3 , project fedena won’t work in ruby 2.2, use this guide for deploying fedena http://aboobacker.in/deploying-fedena-using-ubuntu-14-04/

Thank you for your response