rails is currently not installed after reboot - ruby-on-rails

I have a strange problem: I have installed ruby on rails on rvm. Everything is ok, I can create project.. But after rebooting when I typing "rails new " I have "The program 'rails' is currently not installed.".
System Ubuntu 12.04
ruby -v
"1.9.3p194"
gem list
actionmailer (3.2.5)
actionpack (3.2.5)
activemodel (3.2.5)
activerecord (3.2.5)
activeresource (3.2.5)
activesupport (3.2.5)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.4)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.3)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.5)
railties (3.2.5)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.0.2)
rvm (1.11.3.3)
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
thor (0.15.2)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.4)

Add this to the bottom of your ~/.bashrc file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
If that doesn't work try:
[[ -s "/home/yourusername/.rvm/scripts/rvm" ]] && source "/home/yourusername/.rvm/scripts/rvm"

Terminal->Edit->Profile Preferences->Title and Command->Run command as a login shell

I guess you need edit ur terminal settings
just try
https://beatreader.wordpress.com/2016/08/09/ruby-on-rails-problemmissing-after-reboot/
or
You need to run this code everytime you open for terminal
source "$HOME/.rvm/scripts/rvm"

Related

Gem is in gemlist but getting error: "Could not find gem"

When I try to start my project using rails s I have the following error message occur:
Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
However, I know I definitely have that gem installed because when I put in the command gem list it shows up in my list of gems.
*** LOCAL GEMS ***
actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.14, 3.2.3)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.2.2, 3.0.0)
bundler (1.1.5)
c2c_linux_patch_utilities (0.30.0, 0.29.0)
chef (11.6.2)
chef-zero (1.6)
debug_me (0.5.1)
diff-lcs (1.1.3)
erubis (2.7.0)
gelf (1.1.3)
hashie (2.0.5)
highline (1.6.19)
hike (1.2.1)
i18n (0.6.5)
io-console (0.3)
ipaddress (0.8.0)
journey (1.0.3)
jquery-rails (2.0.1)
json (1.7.7, 1.5.5)
knife-lastrun (0.0.4)
mail (2.4.4)
mime-types (1.25)
minitest (3.2.0, 2.5.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.3.0)
mixlib-config (1.1.2)
mixlib-log (1.6.0)
mixlib-shellout (1.2.0)
moneta (0.6.0)
multi_json (1.8.1)
net-ssh (2.7.0)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0, 1.1)
ohai (6.18.0)
polyglot (0.3.3)
pony (1.4, 1.3)
poseidon (0.0.4)
puma (1.6.3)
rack (1.5.2, 1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (10.1.0, 0.9.2.2)
rdoc (3.12.2, 3.9.5)
rest-client (1.6.7)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.2)
rspec_junit_formatter (0.1.6)
ruby-shadow (2.2.0)
sdoc (0.3.20)
simplecov (0.7.1)
simplecov-html (0.7.1)
sprockets (2.3.1, 2.1.2)
systemu (2.5.2, 2.5.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
xml-simple (1.1.1)
yajl-ruby (1.1.0)
I'm not able to use bundler because the connection is blocked at my workplace, but regardless, why is it giving me the error that the gem needs to be installed when it is installed?
Edit: I used gem environment gemdir to see where my path was for my gems and then tried to set the path for where bundlers looked using bundle config path /installationPath/, but I'm still having the same errors.
Also it is not a problem with the version numbers of the gems in my Gemfile
Bundler messes with the gem load path. gem list shows you what's installed on the system, but not necessarily what Bundler will expose to the application. Have you tried bundle exec rails s or bundle list to see what Bundler is actually exposing?

Why is Rubygems not able to install Rails?

I am trying to install rails using the command
gem install rails
on my ubuntu 12.04 . Also I have configured my apt.conf file with the username , password and proxy details . Then too the execution of this command gives an error as :
ERROR: While executing gem ... (Net::HTTPServerException)
407 "Proxy Authentication Required"
If I run
sudo gem install rails
the errors are :
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: treetop requires polyglot (>= 0), polyglot (>= 0.3.1); sprockets requires tilt (!= 1.3.0, ~> 1.1)
My local gem list is as follows :
* LOCAL GEMS *
actionmailer (4.0.1)
actionpack (4.0.1)
activemodel (4.0.1)
activerecord (4.0.1)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.1)
arel (4.0.1)
atomic (1.1.14)
bigdecimal (1.2.0)
builder (3.1.4)
bundler (1.3.5)
bundler-unload (1.0.2)
coffee-rails (4.0.1)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
erubis (2.7.0)
execjs (2.0.2)
executable-hooks (1.2.6)
hike (1.2.3)
i18n (0.6.5)
io-console (0.4.2)
jbuilder (1.5.2)
jquery-rails (3.0.4)
json (1.8.1, 1.7.7)
mail (2.5.4)
mime-types (1.25)
minitest (4.7.5, 4.3.2)
multi_json (1.8.2)
polyglot (0.3.3)
psych (2.0.0)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.1)
railties (4.0.1)
rake (10.1.0, 0.9.6)
rdoc (4.0.1, 4.0.0, 3.12.2)
rubygems-bundler (1.4.2)
rvm (1.11.3.8)
sass (3.2.12)
sass-rails (4.0.1)
sdoc (0.3.20)
sprockets (2.10.0)
sprockets-rails (2.0.1)
sqlite3 (1.3.8)
test-unit (2.0.0.0)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
treetop (1.4.15)
turbolinks (1.3.0)
tzinfo (0.3.38)
uglifier (2.3.0)
I have already run "rvm requirements" and I have tried using SET HTTP_PROXY but it also doesn't have any affect . What should I do ?
EDIT:
I tried using
export http_proxy=http://${username}:${password}#${proxy}:${port}
and then ran gem install rails and it worked ...
super user and normal user has different gem list.
I think super user does not have polyglot and tilt.
Try:
sudo gem install polyglot
sudo gem install tilt
Please check gem list of super user.
sudo gem list

I can't install 'tunnel-vmc-plugin' to enable tunnelling

I deployed a Rails app on Cloud Foundry, and every time I run vmc tunnel, I keep getting the following error:
Please install 'tunnel-vmc-plugin' to enable tunnelling.
Pardon the extra step; it can't be a direct dependency because it
requires native compilation.
Can anyone tell what's going on here? Thanks.
Here is the additional info:
Rails 3.2.8
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin10.8.0]
vmc 0.5.0.beta.10
Here are all the gems:
actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
addressable (2.3.2, 2.2.8)
arel (3.0.2)
async_sinatra (0.5.0)
bootstrap-sass (2.1.0.1)
builder (3.0.4)
bundler (1.2.3)
caldecott-client (0.0.2)
cf-uaa-lib (1.3.7)
cfoundry (0.5.0, 0.4.20, 0.4.19)
chunky_png (1.2.7, 1.2.6)
clouseau (0.0.2)
compass (0.12.2)
compass-rails (1.0.3)
console-vmc-plugin (0.0.4)
daemons (1.1.9)
em-http-request (0.3.0)
em-websocket (0.3.8)
erubis (2.7.0)
escape_utils (0.2.4)
eventmachine (1.0.0)
execjs (1.4.0)
fssm (0.2.10, 0.2.9)
haml (3.1.7)
haml-rails (0.3.5)
hike (1.2.1)
i18n (0.6.1)
interact (0.5.2)
journey (1.0.4)
jquery-rails (2.2.0, 2.1.4)
json (1.7.6, 1.7.5, 1.6.7)
json_pure (1.6.7)
mail (2.4.4)
manifests-vmc-plugin (0.5.0, 0.4.19)
mime-types (1.20.1, 1.19)
mothership (0.5.0, 0.3.5)
multi_json (1.5.0, 1.4.0)
multipart-post (1.1.5)
mysql2 (0.3.11)
open4 (1.3.0)
Platform (0.4.0)
polyglot (0.3.3)
POpen4 (0.1.4)
rack (1.4.4, 1.4.1)
rack-cache (1.2)
rack-protection (1.3.2)
rack-ssl (1.3.3, 1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (10.0.3)
rdoc (3.12)
rest-client (1.6.7)
rubygems-bundler (1.1.0)
rubyzip (0.9.9)
rvm (1.11.3.6)
sass (3.2.5, 3.2.4)
sass-rails (3.2.6, 3.2.5)
sinatra (1.3.4)
sprockets (2.1.3)
sqlite3 (1.3.6)
thin (1.5.0)
thor (0.17.0, 0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tunnel-dummy-vmc-plugin (0.0.2)
tunnel-vmc-plugin (0.2.0, 0.1.11)
tzinfo (0.3.35)
uglifier (1.3.0)
uuidtools (2.1.3)
vmc (0.5.0.beta.10)
yui-compressor (0.9.6)
vmc tunnel
...should be independent of any apps you have deployed. All you need is
one or more services ("vmc create service" - once done, you can tunnel to it)
Tunneling requires caldecott, so make sure you have followed,
Tunneling to a Cloud Foundry Service with Caldecott
gem list tunnel
...should give you a list of your tunnel plugins
I just updated vmc to beta.12 and it depends on tunnel-vmc-plugin (~> 0.2),
so I removed all other versions.
If you didn't get the tunnel plugin,
gem uninstall vmc
then
gem install vmc --pre

warble, cannot load such file -- spec/rake/spectask error

I'm very new to Ruby, Jruby and Rails etc. I'm trying to deploy a jruby application to tomcat server using warble. I'm on a windows machine, below is the error I get when I run warble from the project's root directory. I did google a lot for the issue, but either the solution didn't work or it wasn't detailed enough for a newbie to understand. Any help or advice is highly appreciated.
> warble
Ruby/Ruby193/lib/ruby/1.9.1/rake/rdoctask.rb
warble aborted!
cannot load such file -- spec/rake/spectask
Following are the Ruby gems that are already installed.
gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bigdecimal (1.1.0)
diff-lcs (1.1.3)
hoe (3.3.0)
i18n (0.4.0)
io-console (0.3)
jruby-jars (1.7.0)
jruby-rack (1.1.10)
json (1.5.4)
minitest (2.5.1)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2.2)
rdoc (3.9.4)
rspec (2.12.0)
rspec-core (2.12.0)
rspec-expectations (2.12.0)
rspec-mocks (2.12.0)
rubyzip (0.9.9)
test-unit (2.5.2, 1.2.3)
warbler (1.3.6)
jruby -S gem list --local
*** LOCAL GEMS ***
actionmailer (3.2.9)
actionpack (3.2.9)
activemodel (3.2.9)
activerecord (3.2.9)
activerecord-jdbc-adapter (1.2.2.1)
activerecord-jdbcmysql-adapter (1.2.2.1)
activeresource (3.2.9)
activesupport (3.2.9)
arel (3.0.2)
builder (3.0.4)
bundler (1.2.2)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.1)
jdbc-mysql (5.1.13)
journey (1.0.4)
jruby-win32ole (0.8.5)
json (1.7.5 java)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.7)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.9)
railties (3.2.9)
rake (0.9.2.2)
rdoc (3.12)
sprockets (2.2.1)
test-unit (2.5.2)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
try jruby -S warble
warble is pointing to the default ruby
your default ruby is not set to jruby.

Ubuntu 12.0.4 rails was working yesterday. Not today

I use rvm and installed it with this instructions https://rvm.io//rvm/install/.
Yesterday when I was working everything was just fine.
Today when I tried to start rails s it says
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
I have no idea how to make it work again. When I run rvm gem list it gives me this:
*** LOCAL GEMS ***
bundler (1.1.4)
rake (0.9.2.2)
rubygems-bundler (1.0.2)
rvm (1.11.3.3)
*** LOCAL GEMS ***
actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
ansi (1.4.2)
arel (3.0.2)
builder (3.0.0)
bundler (1.1.4)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.3)
mail (2.4.4)
mime-types (1.18)
multi_json (1.3.5)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.0.2)
rvm (1.11.3.3)
sass (3.1.19)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
turn (0.9.5)
tzinfo (0.3.33)
uglifier (1.2.4)
So does anybody have any idea why the rails stopped working? And I think it has something to do with when I shutdown the computer yesterday.
If you installed it as root, you need to do source /etc/profile.
If you installed it for your own individual user, you should add ~/.rvm/scripts to your $PATH

Resources