charting-library-examples/ruby-on-rails
2023-02-01 13:50:17 +00:00
..
app Only mention major version, use HTML element container 2022-01-19 17:23:58 +00:00
bin Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
config Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
db Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
lib Removed -example from examples' name 2018-05-04 12:25:44 +03:00
log Removed -example from examples' name 2018-05-04 12:25:44 +03:00
public Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
storage Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
test Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
tmp Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
vendor Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
.gitattributes Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
.gitignore Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
.ruby-version Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
config.ru Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
copy_charting_library_files.sh Update ruby-on-rails example for v23.043 2023-02-01 13:50:17 +00:00
Gemfile Update ruby-on-rails example for v23.043 2023-02-01 13:50:17 +00:00
Gemfile.lock Update ruby-on-rails example for v23.043 2023-02-01 13:50:17 +00:00
Rakefile Update Rails example for v20.033 2022-01-12 12:47:27 +00:00
README.md Update ruby-on-rails example for v23.043 2023-02-01 13:50:17 +00:00

TradingView Charting Library and Ruby on Rails Integration Example.

The earliest supported version of the charting library for these examples is v23.043.

How to start

  1. Check that you can view https://github.com/tradingview/charting_library/. If you do not have access then you can request access to this repository here.

  2. Install Ruby. This example was created using Ruby 3.2.0

  3. Install Ruby on Rails. This example was created using Rails 7.0.4.2

  4. Install Rails dependencies with bundle install. You may encounter an error that would require you to perform a bundle update.

  5. Copy the charting library files

    1. If you are able to run bash scripts then the copy_charting_library_files.sh script can be used to copy the current stable version's files.
    2. If you are not able to run bash scripts then do the following:
      1. Copy charting_library folder from https://github.com/tradingview/charting_library/ to /public.
      2. Copy datafeeds folder from https://github.com/tradingview/charting_library/ to /public.
  6. Run rails s and open http://localhost:3000.

Note that the charting library files are intentionally not included in the Rails asset pipeline. Fingerprinting the charting_library files will break the library so we put the files directly into public. In development mode Rails will serve these public files for you. In production you would need to ensure that the files in public are served by your production webserver.

What is Charting Library

Charting Library is a standalone solution for displaying charts. This free, downloadable library is hosted on your servers and is connected to your data feed to be used in your website or app. Learn more and download.

What is Ruby on Rails

A web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. Ruby on Rails is open source software and there are many of the applications that were built with Ruby on Rails such as Basecamp, GitHub, Shopify, Airbnb, Twitch, SoundCloud, Hulu, Zendesk, Square, Highrise, Cookpad. Learn more.