I am a new user to Ruby on Rails and am having an issue with: rake db:migrate.
After I bundle install, the following comes up:
$ bundle install
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.9)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.9)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.9)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.9)
Using arel (2.0.10)
Using activerecord (3.0.9)
Using activeresource (3.0.9)
Using bundler (1.0.18)
Using rdoc (3.9.4)
Using thor (0.14.6)
Using railties (3.0.9)
Using rails (3.0.9)
Using sqlite3-ruby (1.2.5)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
Then, when I try and rake db:migrate, i get the following:
$ rake db:migrate
Could not find polyglot-0.3.2 in any of the sources
Run `bundle install` to install missing gems.
Anyone have any advice? Thanks.
I am on ruby 1.8.7 and rails 3.0.9
Check where it's installed:
gem list -d polyglot
Run bundle exec to make sure rake uses what's specified in your gemfile:
bundle exec rake db:migrate
Ya..apparently the polyglot gem is not included in your gem file.
Also try doing gem install polyglot...
Hope it helps !
bundle exec rake db:migrate might help too..
Related
I have a query about RadRails and the activerecord-oracle_enhanced-adapter. I am using RadRails 2.
Below is a list of my local gems, garnered from the output of the gem list –local command:
*** LOCAL GEMS ***
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activerecord-oracle_enhanced-adapter (1.6.7)
activeresource (2.3.4)
activesupport (2.3.4)
bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
oracle_enhanced (1.2.5)
psych (2.0.8)
rack (1.0.1)
rails (2.3.4)
rake (10.4.2)
rdoc (4.2.0)
However, when I try to run the rake migrate command the following appears:
rake aborted!
Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (no such file to load -- active_record/connection_adapters/oracle_enhanced_adapter)
(See full trace by running task with --trace)
I have uninstalled activerecord-oracle_enhanced-adapter and reinstalled it, restarted RadRails, all to no avail.
The problem is that you using rails 2.3.4 (last updated in 2010) with the newest activerecord oracle enhanced adapter 1.6.7 that released just few weeks ago.
Try to update your rails to 4.1 (it's also requires update ruby to 2.3) or downgrade activerecord-oracle_enhanced-adapter to 1.3.2 in your Gemfile:
gem 'activerecord-oracle_enhanced-adapter', '~> 1.3', '>= 1.3.2'
Also it would be better do not use so old RadRails. Try latest ruby and rails in any modern editor or IDE!
I am a Rails & Ruby noob and was going through the Agile Web Development with Rails book. I did a routine rake command and got this familiar message:
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (ava
ilable in RDoc 2.4.2+) instead.
c:/rails_projects/depot/Rakefile:8:in `'
I searched Google thoroughly, tried editing my Gemfile a couple of times as suggested in other threads, updated rdoc gem, and still I get this error. I am running Rails 3.0.5, Ruby 1.9.3p392, rdoc 4.0.2. This is my bundle install:
Using rake (10.0.4)
Using abstract (1.0.0)
Using activesupport (3.0.5)
Using builder (2.1.2)
Using i18n (0.6.4)
Using activemodel (3.0.5)
Using erubis (2.6.6)
Using rack (1.2.8)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.37)
Using actionpack (3.0.5)
Using mime-types (1.22)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.2.19)
Using actionmailer (3.0.5)
Using arel (2.0.10)
Using activerecord (3.0.5)
Using activeresource (3.0.5)
Using json (1.7.7)
Using bundler (1.3.4)
Using thor (0.14.6)
Using railties (3.0.5)
Using rails (3.0.5)
Using rdoc (4.0.1)
Using sqlite3 (1.3.7)
And my Gemfile:
gem 'rails', '3.0.5'
gem 'sqlite3'
gem 'rdoc', ">= 4.0.1"
require 'rdoc/task'
I put that gem rdoc thing in based on one forum I found.
The bad require 'rake/rdoctask' call is happening in Rails itself. The simplest solution is probably to update Rails. You should be able to work through that book just fine using Rails 3.0.20.
i have a problem - i have Ubuntu 12.04 server and I am trying to host ruby on rails app on it.
I have chosen passenger with apache. I have installed RVM and made gemset "ruby-1.9.2-p320#myapp" and it works. I have really old rails 2.3.8 app, which is just for archive for me and I dont have any time to update it.
I have passenger error Please install the mysql2 adapter: 'gem install activerecord-mysql2-adapter' (no such file to load -- active_record/connection_adapters/mysql2_adapter)
My "gem list":
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-mysql2-adapter (0.0.3)
activeresource (2.3.8)
activesupport (2.3.8)
bundler (1.2.3)
daemon_controller (1.1.1)
fastthread (1.0.7)
mislav-will_paginate (2.3.11)
mysql2 (0.2.7)
passenger (3.0.19)
rack (1.1.6)
rails (2.3.8)
rake (10.0.3)
rubygems-bundler (1.1.0)
rubygems-update (1.8.25, 1.3.5)
rvm (1.11.3.6)
sqlite3 (1.3.7)
sqlite3-ruby (1.3.3)
thoughtbot-paperclip (2.3.1)
will_paginate (3.0.4)
I can using ruby script/console get to database records, so connection with database is established and it WORKS.
Is there any ideas for solution?
Thank you.
If any extra info is needed, it will be provided asap.
This was misconfiguration of Passenger and Apache from my part.
Just follow these loveley tutorial and all will be OK: http://everydayrails.com/2010/09/13/rvm-project-gemsets.html
And if you afterwards run into problems of UTF-8 errors for older rails apps, just read on that here: http://railsforum.com/viewtopic.php?id=42009
Your help would be MUCH appreciated. I am new to programming and want am trying to start alexch's Learn_Ruby, but am stuck on the very first lesson: 00_hello.
I am running "rake" test am am getting weird errors:
Justins-MacBook-Pro:00_hello Justin$ rake
(in /Users/Justin/Desktop/learn_ruby-master)
rake aborted!
undefined method `gem' for main:Object
/Users/Justin/Desktop/learn_ruby-master/Rakefile:2
(See full trace by running task with --trace)
I'm just following the instructions from the course: https://github.com/alexch/learn_ruby/blob/master/index.html
here are my specs:
ruby 1.8.7
rspec 2.12
gem 1.8.25
anything thing else i'm missing??
Your Help is MUCH appreciate.
here is the gem list:
Justins-MacBook-Pro:00_hello Justin$ gem list
*** LOCAL GEMS ***
activemodel (3.2.11)
activerecord (3.2.11)
activesupport (3.2.11)
arel (3.0.2)
builder (3.1.4, 3.0.4)
diff-lcs (1.2.0, 1.1.3)
i18n (0.6.1)
multi_json (1.5.0)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rubygems-update (1.8.25)
tzinfo (0.3.35)
uuidtools (2.1.3)
First update rubygems by following command:
gem update --system
That should solve it.
If not then try removing the following line from the rakefile
gem 'rspec', '~>2'
I am running Ruby 1.9.2. I have rake 0.8.7 installed. However running rake inside a Rails application gives me the following:
(in /usr/home/users/dimitar/Rails/spek)
Could not find activesupport-3.0.1 in any of the sources
Try running `bundle install`.
So I go ahead and run bundle install again and everything looks good:
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.1)
Using builder (2.1.2)
Using i18n (0.4.1)
Using activemodel (3.0.1)
Using erubis (2.6.6)
Using rack (1.2.1)
Using rack-mount (0.6.13)
Using rack-test (0.5.6)
Using tzinfo (0.3.23)
Using actionpack (3.0.1)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.8)
Using mail (2.2.7)
Using actionmailer (3.0.1)
Using arel (1.0.1)
Using activerecord (3.0.1)
Using activeresource (3.0.1)
Using bundler (1.0.3)
Using thor (0.14.3)
Using railties (3.0.1)
Using rails (3.0.1)
Using sqlite3-ruby (1.3.1)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
But rake still gives me the same error message. Any suggestions?
Actually the problem seems to come from the config/boot.rb file:
# Set up gems listed in the Gemfile.
gemfile = File.expand_path('../../Gemfile', __FILE__)
begin
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
rescue Bundler::GemNotFound => e
STDERR.puts e.message
STDERR.puts "Try running `bundle install`."
exit!
end if File.exist?(gemfile)
Do you have multiple Ruby interpreters installed (maybe via rvm or some other method)? If so, are you sure that the right one is active?
Things to look at:
which ruby
which rake
ruby -e 'puts $:' # To show the LOAD_PATH for gems
I had a similar problem using ruby-1.9.2 and fixed it by upgrading rubygems
sudo gem update --system
I had the same problem when I was using REE 1.8.7. I switched to 1.9.2 and did bundle install. Then my rake commands worked.
I had this issue when I mistakenly ran passenger with ruby 1.9.3 and the app used 1.8.7 in its .rvmrc. Fixed by using 1.9.3 (now I have encoding problems, but thats a different story).