Closed Pandop closed 6 years ago
Hi @Pandop I do not believe this is an issue with the gem but your application or environment. I just tested the gem and it is working:
$ irb
2.3.1 :001 > require 'rubygems'
=> false
2.3.1 :002 > require 'stock_quote'
=> true
2.3.1 :003 > StockQuote::Stock.quote('aapl')
=> #<StockQuote::Stock:0x007fdbe0a557d0 @symbol="AAPL", @company_name="Apple Inc.", @primary_exchange="Nasdaq Global Select", @sector="Technology", @calculation_price="close", @open=194.16, @open_time=1528378200576, @close=193.46, @close_time=1528401600319, @high=194.2, @low=192.335, @latest_price=193.46, @latest_source="Close", @latest_time="June 7, 2018", @latest_update=1528401600319, @latest_volume=21252573, @iex_realtime_price=193.5, @iex_realtime_size=7, @iex_last_updated=1528401591973, @delayed_price=193.46, @delayed_price_time=1528401600319, @extended_price=193.46, @extended_change=0, @extended_change_percent=0, @extended_price_time=1528405105000, @previous_close=193.98, @change=-0.52, @change_percent=-0.00268, @iex_market_percent=0.02604, @iex_volume=553417, @avg_total_volume=28250502, @iex_bid_price=0, @iex_bid_size=0, @iex_ask_price=0, @iex_ask_size=0, @market_cap=950882597480, @pe_ratio=19.88, @week52_high=194.08, @week52_low=142.2, @ytd_change=0.13235977437295748, @attribution="Data provided for free by IEX (https://iextrading.com/developer).", @response_code=200>
The error suggests there is something wrong with your layout.
Hi,I'm currently using stock_quote version 2.0.0. I have installed the gem using "bundle install" and included the necessary code snippet as below. However, When the code is run from browser using "localhost:3000", the server terminates suddenly with the following error.
The browser gives this error: "This site can't be reached. ERR_CONNECTION RESET."
Below is my code.
Segment code inside the gemFile
home_controller.rb
Index.html.erb
I'd appreciate your help on the above as I cannot proceed with the course from this point forward.
Thanks.