Nie potrafie zainstalowac railsow - json 1.8.1

Witam jestem zielony w temacie i bardzo chcial bym zacząć przygode z ruby.

juz sam nie wiem co sie dzieje, nie wiem czy wamp moze miec cos wspolnego z problemem. czy mozna pisac w railsach bez serwera.

przechodze poprzez proces instalacji zgodnie z informacjami na stronie www.rubyonrails.pl
pobieram wersje instalacyjna na windowsa, rubyinstaller-2.0.0-p481 i to samo z wersja 64 bit
mam windowsa 8
instaluje
w konsoli robiego uruchamiam polecenie gem install rails

caly przebieg instalacji:

ruby 2.0.0p481 (2014-05-08) [i386-mingw32]

C:\Users\lukasz>gem install rails
Fetching: i18n-0.6.11.gem (100%)
Successfully installed i18n-0.6.11
Fetching: thread_safe-0.3.4.gem (100%)
Successfully installed thread_safe-0.3.4
Fetching: tzinfo-1.2.1.gem (100%)
Successfully installed tzinfo-1.2.1
Fetching: minitest-5.4.0.gem (100%)
Successfully installed minitest-5.4.0
Fetching: activesupport-4.1.4.gem (100%)
Successfully installed activesupport-4.1.4
Fetching: rack-1.5.2.gem (100%)
Successfully installed rack-1.5.2
Fetching: rack-test-0.6.2.gem (100%)
Successfully installed rack-test-0.6.2
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: actionview-4.1.4.gem (100%)
Successfully installed actionview-4.1.4
Fetching: actionpack-4.1.4.gem (100%)
Successfully installed actionpack-4.1.4
Fetching: activemodel-4.1.4.gem (100%)
Successfully installed activemodel-4.1.4
Fetching: arel-5.0.1.20140414130214.gem (100%)
Successfully installed arel-5.0.1.20140414130214
Fetching: activerecord-4.1.4.gem (100%)
Successfully installed activerecord-4.1.4
Fetching: mime-types-1.25.1.gem (100%)
Successfully installed mime-types-1.25.1
Fetching: polyglot-0.3.5.gem (100%)
Successfully installed polyglot-0.3.5
Fetching: treetop-1.4.15.gem (100%)
Successfully installed treetop-1.4.15
Fetching: mail-2.5.4.gem (100%)
Successfully installed mail-2.5.4
Fetching: actionmailer-4.1.4.gem (100%)
Successfully installed actionmailer-4.1.4
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: railties-4.1.4.gem (100%)
Successfully installed railties-4.1.4
Fetching: bundler-1.6.3.gem (100%)
Successfully installed bundler-1.6.3
Fetching: hike-1.2.3.gem (100%)
Successfully installed hike-1.2.3
Fetching: multi_json-1.10.1.gem (100%)
Successfully installed multi_json-1.10.1
Fetching: tilt-1.4.1.gem (100%)
Successfully installed tilt-1.4.1
Fetching: sprockets-2.12.1.gem (100%)
Successfully installed sprockets-2.12.1
Fetching: sprockets-rails-2.1.3.gem (100%)
Successfully installed sprockets-rails-2.1.3
Fetching: rails-4.1.4.gem (100%)
Successfully installed rails-4.1.4
Parsing documentation for i18n-0.6.11
Installing ri documentation for i18n-0.6.11
Parsing documentation for thread_safe-0.3.4
Installing ri documentation for thread_safe-0.3.4
Parsing documentation for tzinfo-1.2.1
Installing ri documentation for tzinfo-1.2.1
Parsing documentation for minitest-5.4.0
Installing ri documentation for minitest-5.4.0
Parsing documentation for activesupport-4.1.4
unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/active_support/values/
unicode_tables.dat, skipping
Installing ri documentation for activesupport-4.1.4
Parsing documentation for rack-1.5.2
Installing ri documentation for rack-1.5.2
Parsing documentation for rack-test-0.6.2
Installing ri documentation for rack-test-0.6.2
Parsing documentation for builder-3.2.2
Installing ri documentation for builder-3.2.2
Parsing documentation for erubis-2.7.0
Installing ri documentation for erubis-2.7.0
Parsing documentation for actionview-4.1.4
Installing ri documentation for actionview-4.1.4
Parsing documentation for actionpack-4.1.4
Installing ri documentation for actionpack-4.1.4
ERROR:  While executing gem ... (Errno::EINVAL)
    Invalid argument - ./ActionDispatch/Routing/Mapper/Scoping/:

kolejna komenda to rails new myapp:
no i pojawia sie błąd

ruby 2.0.0p481 (2014-05-08) [i386-mingw32]

C:\Users\lukasz>rails new myapp
DL is deprecated, please use Fiddle
       exist
   identical  README.rdoc
   identical  Rakefile
   identical  config.ru
   identical  .gitignore
   identical  Gemfile
       exist  app
   identical  app/assets/javascripts/application.js
   identical  app/assets/stylesheets/application.css
   identical  app/controllers/application_controller.rb
   identical  app/helpers/application_helper.rb
   identical  app/views/layouts/application.html.erb
   identical  app/assets/images/.keep
   identical  app/mailers/.keep
   identical  app/models/.keep
   identical  app/controllers/concerns/.keep
   identical  app/models/concerns/.keep
       exist  bin
   identical  bin/bundle
   identical  bin/rails
   identical  bin/rake
       exist  config
   identical  config/routes.rb
   identical  config/application.rb
   identical  config/environment.rb
    conflict  config/secrets.yml
</config/secrets.yml? (enter "h" for help) [Ynaqdh]
       force  config/secrets.yml
       exist  config/environments
   identical  config/environments/development.rb
   identical  config/environments/production.rb
   identical  config/environments/test.rb
       exist  config/initializers
   identical  config/initializers/assets.rb
   identical  config/initializers/backtrace_silencers.rb
   identical  config/initializers/cookies_serializer.rb
   identical  config/initializers/filter_parameter_logging.rb
   identical  config/initializers/inflections.rb
   identical  config/initializers/mime_types.rb
   identical  config/initializers/session_store.rb
   identical  config/initializers/wrap_parameters.rb
       exist  config/locales
   identical  config/locales/en.yml
   identical  config/boot.rb
   identical  config/database.yml
       exist  db
   identical  db/seeds.rb
       exist  lib
       exist  lib/tasks
   identical  lib/tasks/.keep
       exist  lib/assets
   identical  lib/assets/.keep
       exist  log
   identical  log/.keep
       exist  public
   identical  public/404.html
   identical  public/422.html
   identical  public/500.html
   identical  public/favicon.ico
   identical  public/robots.txt
       exist  test/fixtures
   identical  test/fixtures/.keep
       exist  test/controllers
   identical  test/controllers/.keep
       exist  test/mailers
   identical  test/mailers/.keep
       exist  test/models
   identical  test/models/.keep
       exist  test/helpers
   identical  test/helpers/.keep
       exist  test/integration
   identical  test/integration/.keep
   identical  test/test_helper.rb
       exist  tmp/cache
       exist  tmp/cache/assets
       exist  vendor/assets/javascripts
   identical  vendor/assets/javascripts/.keep
       exist  vendor/assets/stylesheets
   identical  vendor/assets/stylesheets/.keep
         run  bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.3.2
Using i18n 0.6.11

Gem::InstallError: The 'json' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

no i cala reszta

C:\Users\lukasz>cd myapp

C:\Users\lukasz\myapp>rails s
Could not find gem 'tzinfo-data (>= 0) x86-mingw32' in the gems available on
s machine.
Run `bundle install` to install missing gems.

C:\Users\lukasz\myapp>

Pomocy prosze:( probowalem juz instalowac te cale json

enter preformatted text hereC:\Users\lukasz\myapp>gem install json -v '1.8.1'
ERROR:  Error installing json:
        The 'json' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

juz nie wiem jak sie do tego zabrac:/

1 Like

Stawiam, ze nie masz zainstalowanego kompilatora pod tym MingGW (ewentualnie cos ze sciezkami)

http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite

Co mowi gcc albo g++ ?

Kompilator jest potrzebny do zainstalowania (zbudowania) gemow korzystajacych z kodu w C (tak jak wspomniany gem json)

Prosił bym o wskazówki jak ro sprawdzic?

Jezeli chodzi o kompilator C albo C++ to nie ma problemu bo na tym lapie programowalem.

zaraz sprobuje wszytko jeszcze raz odinstalowac i wszystko otwierac jako administrator.

pytanie tylko czy wystaczy zwykly plik unistal w katalogu ruby200? czy jakos inaczej go odinstalowac ?

problem rozwiazany

to mi pomoglo
zrobilem krok po kroku i dziala

Dzieki za zaangazowanie:)

Super - poza tym chyba zasugerowalem sie, ze [i386-mingw32] oznacza, ze Ruby Installer instaluje MinGW, ale to chyba po prostu binarka ruby-ego skompilowana pod MinGW.

Aczkolwiek ten caly DevKit - https://github.com/oneclick/rubyinstaller/wiki/Development-Kit - JEST oparty o MinGW, wiec pewnie ‘pod spodem’ chodzilo albo o binutilsy i/albo kompilator (zeby byly zainstalowane i widoczne)

Grunt, ze dziala :wink:

Może to nie jest popularna porada i nie odpowiada wprost na Twoje pytanie, aczkolwiek development pod Windows bardzo szybko będzie ci stwarzał coraz więcej problemów. Zdecydowanie łatwiej Ci pójdzie, jeżeli zainstalujesz sobie wirtualkę z Linuksem i tam będziesz uruchamiał sobie środowisko developerskie. Zawsze można udostępnić sobie pliki do edycji po sieci i sam edytor odpalać pod Windows.