I have just installed heroku and plan to use it with rails on Ruby. However, when I run "heroku create" command I get this:
hadoop#master:~/rails_projects/first_app> gem install heroku
Successfully installed heroku-2.16.3
1 gem installed
Installing ri documentation for heroku-2.16.3...
Installing RDoc documentation for heroku-2.16.3...
hadoop#master:~/rails_projects/first_app> heroku -v
/home/hadoop/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- readline (LoadError)
from /home/hadoop/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/heroku-2.16.3/lib/heroku/command/run.rb:1:in `<top (required)>'
from /home/hadoop/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/hadoop/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/heroku-2.16.3/lib/heroku/command.rb:14:in `block in load'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/heroku-2.16.3/lib/heroku/command.rb:13:in `each'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/heroku-2.16.3/lib/heroku/command.rb:13:in `load'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/gems/heroku-2.16.3/bin/heroku:12:in `<top (required)>'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/heroku:19:in `load'
from /home/hadoop/.rvm/gems/ruby-1.9.2-p290#rails3tutorial/bin/heroku:19:in `<main>'
hadoop#master:~/rails_projects/first_app
Is there something wrong with versions I am using?
The problem here is with RVM and readline - checkout
https://rvm.io/packages/readline/
Related
I am a new user to Ruby on Rails, and I've been following the official getting started.
Platform: Windows 10
Ruby 2.2.4
Rails 4.2.5.2
What I am doing:
rails new myapp cd myapp bundle install rails server
Then I get this error:
C:\Users\MyUser\AAA\myapp>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:21:in `callers': uninitialized constant RubyVM::DebugInspector (NameError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/integration/cruby.rb:28:in `set_backtrace_with_binding_of_caller'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/Users/MyUser/AAA/myapp/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have already tried uninstalling debug_inspector and running bundle install after, but the problem persists.
Can anyone help me please?
If it is still actual. Try to add debug_inspector to your Gemfile.
You need to bundle the gem before start rails server. Follow following steps:
rails new myapp
cd myapp
bundle install
rails server
I deleted all versions of debug inspector first:
gem uninstall debug_inspector
then installed it again with the arch -arm64 flag
arch -arm64 gem install debug_inspector
For some reason, it required to install another gem (which may not be necessary for you)
arch -arm64 gem install rbs -v 2.1.0
And after that, the error has gone.
I am getting an error I have no clue how to fix it.
$ rails console
/Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)
from /Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/commands.rb:33:in `<module:Spring>'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/commands.rb:4:in `<top (required)>'
from /Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:77:in `preload'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:143:in `serve'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:131:in `block in run'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:125:in `loop'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:125:in `run'
from /Users/liviu-mac/rails_projects/instrumon/vendor/bundle/gems/spring-1.6.1/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liviu-mac/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
$ rails -v
Rails 4.2.5
$ rvm current
ruby-2.2.3
$ irb
2.3.0 :001 >
I am able to start the server with rails s and the app is working. I am able to deploy on Heroku and I can execute rails dbconsole.
Downgraded bundler from 1.11.x to 1.10.2
Removed the folder .bundler from ~ and any main folder of all rails projects (several)
Executed from the main folder of any rails project the command: bundle install --system
Problem solved.
I've been working on a Ruby on Rails project for class and have run into some problems. When I run bundle install, all of my gems install appropriately. When I run rake db:setup, I get the following error.
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ rake db:setup
rake aborted!
cannot load such file -- ./bundler/setup
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:6:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
I am also get this error when I try to run any of my unit tests:
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ ruby test/unit/user_test.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require': cannot load such file -- ./bundler/setup (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:6:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/config/environment.rb:2:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/tuggernuts2/Workspace/Class/baseball-manager/test/test_helper.rb:2:in `<top (required)>'
from test/unit/user_test.rb:2:in `require_relative'
from test/unit/user_test.rb:2:in `<main>'
I'm working on this project with a group of 4 others, and no one else is getting these errors so I infer that the problem is with my setup and not with the code.
I'm running ruby version "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"
I'm running ruby gems version 1.8.23
I'm running rails version 3.2.5
but when I run rails -v I get the same require error, and the same ./bundler/setup error as above. I've been googling these problems for awhile and non of the solutions I've found so far have helped.
I've tried re-installing gems, I've tried running gem update -system, but that just gives me:
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian, because it will overwrite the content of the rubygems Debian package, and might break your Debian system in subtle ways. The Debian-supported way to update rubygems is through apt-get, using Debian official repositories.
If you really know what you are doing, you can still update rubygems by setting the REALLY_GEM_UPDATE_SYSTEM environment variable, but please remember that this is completely unsupported by Debian.
The rake errors are new as of yesterday, the ruby require errors have been there pretty much since the beginning. Life has been a struggle.
I've tried a bunch of combinations of require, require "./...", require_relative, and nothing seems to fix the require errors.
Any and all help is appreciated. Thanks in advance.
Edit: Output from: bundle exec rake db:setup --trace
tuggernuts2#tn-Extensa5620:~/Workspace/Class/baseball-manager$ bundle exec rake db:setup --trace
rake aborted!
cannot load such file -- ./bundler/setup
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:7:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/boot.rb:7:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/config/application.rb:1:in `<top (required)>'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `require'
/home/tuggernuts2/Workspace/Class/baseball-manager/Rakefile:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
I have created a test application, installed bundle and all the gems.
When i cd into the app and enter the command 'rails s' or 'rails server', this is what I get back:
/Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:213: warning: Insecure world writable dir /Library/Ruby/Gems/1.8 in PATH, mode 040777
gem install minitest
/Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9:in `require': no such file to load -- minitest/unit (LoadError)
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn/minitest.rb:9
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn.rb:13:in `require'
from /Library/Ruby/Gems/1.8/gems/turn-0.9.6/lib/turn.rb:13
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.1.1/lib/bundler.rb:119:in `require'
from /Applications/MAMP/htdocs/railsTestApp1/config/application.rb:7
from /Library/Ruby/Gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:53
from /Library/Ruby/Gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from /Library/Ruby/Gems/1.8/gems/railties-3.2.2/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6
I have tried to figure out what is missing. Desperately, I tried installing the gem minitest into /Ruby/Gems/ as well as in /Ruby/Gems/1.8/gems/, but obviously I have no idea what I'm doing here. So please, I what am I doing wrong??
I'm pretty new to RoR, I have a couple of working rails apps on my computer but I must have done something wrong because now I can't create new apps. The problem is when I do this:
$ rake db:migrate
I get this:
anarres#supakewl:~/prog/rails3/myapp$ rake db:migrate
(in /home/anarres/prog/rails3/myapp)
rake aborted!
Could not find RubyGem bundler (>= 0)
/usr/local/ruby/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error'
/usr/local/ruby/lib/ruby/1.9.1/rubygems.rb:219:in `activate'
/usr/local/ruby/lib/ruby/1.9.1/rubygems.rb:1065:in `gem'
/home/anarres/prog/rails3/myapp/config/boot.rb:2:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/anarres/prog/rails3/myapp/config/application.rb:1:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/home/anarres/prog/rails3/myapp/Rakefile:4:in `<top (required)>'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/local/ruby/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/local/ruby/bin/rake:31:in `<main>'
I definitely have Bundler 1.0.7 installed. I installed it by doing
$ sudo gem install bundler
and I'm guessing that could be the problem because I've read in a couple of places that you're not supposed to use sudo. But if I try to do that without sudo I get a permission error. I'm running Ubuntu 10.04 and Rails 3.0.3.
Try sudo gem list just to ensure that bundler is there on your system.
Also, if you're using RVM, make sure you've installed it for the active VM - I've run into this a few times where I've switched to a different RVM, forgot to install bundler in the base gemset and fire off a task that then generated this error.