Właśnie zaczynam naukę ruby on rails.
Używam Ubunt. Ruby i railsy zainstalowałem jak w podręczniku. Nie działa localhost:3000
Po wpisaniu rails server pokazuje się coś takiego:
_Could not find gem ‘rails (= 4.0.2)’ in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.
Co mam teraz zrobić? Może dla kogoś to śmieszny problem, ale dopiero zaczynam. Z góry dziękuje za podpowiedź
po wpisaniu bundle install pojawia się: najpierw Fetching gem metadata from https://rubygems.org/…
a na koniec
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.
od instalowałem udo apt-get purge ruby
potem zainstalowałem jak na stronce rvm.io
ale po wpisaniu rails server pojawia się
Could not find gem ‘rails (= 4.0.2)’ in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.
później po wpisaniu bundle install
na końcu komunikat
Using uglifier 3.0.0
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.
po wpisaniu gem install json -v ‘1.8.3’`
ERROR: Could not find a valid gem ‘1.8.3’ (>= 0) in any repository
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
po wpisaniu rails -v pokazuje się
Could not find gem ‘rails (= 4.0.2)’ in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.
rvm instalowałem tak:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
potem
\curl -sSL https://get.rvm.io | bash -s stable
liuksa użytkuje od soboty tak więc proszę o wyrozumiałość
wpisałem sudo apt-get purge ruby
następnie rvm install ruby-2.3.0,
gem install rails
potem utworzyłem nowy : rails new nowy
potem: rails server i pojawiło się
Could not find gem ‘rails (= 3.2.16)’ in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.
Po wpisaniu bundle install pojawia się
Fetching gem metadata from https://rubygems.org/…
itd aż do
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.
RVM is not a function, selecting rubies with ‘rvm use …’ will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use /bin/bash --login as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.
po wpisaniu rails server
/home/lenovo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- rails/cli (LoadError) from /home/lenovo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /usr/bin/rails:7:in `’
Teraz, za każdym razem, jak bedziesz otwierał nowe okno terminala, by uzywac rubiego to używaj /bin/bash --login
Jesli chcesz się tego pozbyc, to uzyj googla
wpisałem /bin/bash --login i nacisnąłem enter
później rails server
i pokazuje sie
Could not find gem ‘rails (= 3.2.16)’ in any of the gem sources listed in your Gemfile or available on this machine.
Run bundle install to install missing gems.
wpisuje rvm use 2.3.0
potem /bin/bash --login
następnie rails server
/home/lenovo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- rails/cli (LoadError) from /home/lenovo/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
from /usr/bin/rails:7:in `’