Deploy Rails program to Heroku under Fedora 15 - ruby-on-rails

[root#chris-notebook helloworld]# heroku create helloworld --stack cedar
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- readline (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.8.0/lib/heroku/command/run.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.8.0/lib/heroku/command.rb:17:in `block in load'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.8.0/lib/heroku/command.rb:16:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.8.0/lib/heroku/command.rb:16:in `load'
from /usr/local/lib/ruby/gems/1.9.1/gems/heroku-2.8.0/bin/heroku:13:in `<top (required)>'
from /usr/local/bin/heroku:19:in `load'
from /usr/local/bin/heroku:19:in `<main>'
When I try to create that, every time I got same error.
What should I do? I saw similar problems but under Ubuntu. They solve it by going some place ...src/ruby../ext/readline and then execute
ruby extconf.rb
make
make install
but I don't see that folder in file system. Why is it all so difficult?
Update
Solved by installing next packages
readline-devel.i686
readline-static.i686
And then making similar operations in the folder ext/readline that placed in downloaded sources of ruby.

Related

RoR on OS10.11.2: kernel_require.b54:in : cannot load such file when trying to generate controller welcome

I just started learning Ruby on Rails from Hartl's "Ruby on rails 3: Learn Rails by example" (but I do have rails 4.2.5). Everything worked great until I tried to deploy to Heroku - couldn't get pass the $ git push heroku master, so I found this https://devcenter.heroku.com/articles/getting-started-with-rails4#local-workstation-setup and started over according to these instructions. Everything works perfecto, apart from `
$ rails generate controller welcome`
`/Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file --
bundler/setup (LoadError)
from /Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/commands.rb:33:in `<module:Spring>'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/commands.rb:4:in `<top (required)>'
from /Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:77:in `preload'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:143:in `serve'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:131:in `block in run'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:125:in `loop'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application.rb:125:in `run'
from /Users/liisvaljaots/myapp/vendor/bundle/gems/spring-1.6.1/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/liisvaljaots/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'`
I'm all Googled out on this issue, maybe someone here can help.
Also, another possibly related issue is this line in my Terminal when I open it bash: eval: line 21: syntax error: unexpected end of file
Thank you!

Ruby1.8 Rails2.3 ./script/server producing error

I have been assigned a projected that was written in Ruby1.8 and Rails2.3. We can't upgrade at the moment. I have successfully installed ruby and rails and installed all needed gems for the project on a ubuntu machine. I have received success messages while installing everything.
However, when I run the command ./script/server I received the output:
/var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require': no such file to load -- sentry (MissingSourceFile)
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /home/robotmaster/Documents/Source/agile/config/initializers/sentry.rb:1
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load_without_new_constant_marking'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:622:in `load_application_initializers'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:621:in `each'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:621:in `load_application_initializers'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:176:in `process'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:113:in `send'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:113:in `run'
from /home/robotmaster/Documents/Source/agile/config/environment.rb:42
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /var/lib/gems/1.8/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in `require'
from /var/lib/gems/1.8/gems/rails-2.3.18/lib/commands/server.rb:84
from ./script/server:4:in `require'
from ./script/server:4
I am new to the Rails and would appreciate any help with this error message. Thanks
The key to the issue is here:
sentry (MissingSourceFile)
I'm really not familiar with that particular file (and Rail 2.3 is several major revisions behind...) but it indicates to me that there's something incomplete about your Gem set.
gem update
This would be my first attempt. Verify that all of the referenced gems in your Gemfile are present on the system. If at all possible, I'd really look to upgrade to at least Rail 3, preferably 4.
EDIT:
Reading this again, why are you executing ./script/server? You should be executing:
rails s

Rake aborted, cannot load file ./bundler/setup, ruby require errors in RubyOnRails application

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>'

can't start rails server, getting a lot of "load errors"

I am trying to setup an existing project of friends on my ubuntu
i installed ruby ree-1.8.7 with rvm
and ran the rvm use command to switch to that ruby.
then ran bundle install in the app folder and it installed all the gems (there are a lot)
now i tried running rails server and i am getting a huge amount of errors.
i won't copy all the text because its big, but here is how it looks basicly. how do i go about solving this?
/home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require': no such file to load -- twitter-text (LoadError)
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/twitter-2.0.0/lib/twitter/status.rb:9
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/twitter-2.0.0/lib/twitter/user.rb:5
from /home/schaller/.rvm/gems/ree-1.8.7-2012.02/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
Its not a huge amount of errors, its just one error and what you are seeing is the stack trace :)
The real error is:
`require': no such file to load -- twitter-text (LoadError)
So add twitter-text to your Gemfile and try again ;)

problem on setting up ruby on rails

I just started learning ruby on rails with "Lynda Ruby on Rails 3 Essential Training".
I finished the installation, and created rails application by writing- "rails new app".
After that when I wrote - "rails server", that's what I saw:
C:\Users\Oded\sites\simple_cms>rails server
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/mysql2.r
b:2:in `require': 193: %1 is not a valid Win32 application. - C:/Ruby192/lib/r
uby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6-x86-mingw32/lib/my
sql2.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:64:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:62:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/runti
me.rb:51:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb:11
2:in `require'
from C:/Users/Oded/sites/simple_cms/config/application.rb:7:in `<top (re
quired)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/comman
ds.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Can you please help me find the solution?
Happy holidays,
Oded
Looks like you're missing some gems! try running bundle install... then all should work.
EDIT: make sure that your Gemfile contains the line
gem 'mysql'
before running bundle install. Bundler will get you set up for mysql, dependencies and all.
You have to go to this website and follow the directions ...
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
or in short download the connector mentioned in the article from mysql or a mirror site
Run this command:
gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql-connector-c-noinstall-6.0.2-win32
Make sure you have the correct path to the mysql connector folder that has no spaces!!
After that is complete make sure you copy the libmysql.dll file from the connector library you unzipped and downloaded and placed that in the Ruby\bin file.
After that delete the connector libary and start it up by typing 'rails server' making sure your gem file has the line gem 'mysql' or gem 'mysql2' I'm not sure which one so try both. It sucks and they really need to fix this for windows.

Resources