Coder Social home page Coder Social logo

spfarm's People

Contributors

rhearnorth avatar teerasej avatar

Watchers

 avatar  avatar

spfarm's Issues

ทำให้ Dashboard ที่โฮสบน heroku สามารถอ้างเป็นส่วนหนึ่งของ domain sp.in.th

เท่าที่หาข้อมูลมา จะมีวิธีนี้ของ Heroku

แต่แยกออกเป็น http และ https
ซึ่งของเราต้องเป็น https แน่นอน แต่มันแยกออกเป็น 2 วิธี

ซึ่งการเข้าไป Setup DNS จะทำผ่าน cPanel ด้วยรหัสผ่านที่อยู่ใน Card ของ Trello

หลังจาก Pull Master มาแล้ว เจอ error ตอนเข้า dashboard หลังจากรัน rails s

หลังจาก pull master ตัวล่าสุดมา รัน rails s แล้วเจอ error บนหน้าเว็บว่า

TypeError at /
no implicit conversion of nil into Array

เห็น @rhearnorth ทำการใส่ seed contract plan เข้ามาใหม่ เลยลองรัน rake db:migrate ดู เจอ error แบบด้านล่างจ้า

ควรทำยังไงต่ออ่ะ?

rake db:migrate
rake aborted!
LoadError: cannot load such file -- bundler/dep_proxy
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/boot.rb:3:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `<top (required)>'
/Users/teerasejjiraphatchandej/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- bundler/dep_proxy
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/boot.rb:3:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `<top (required)>'
/Users/teerasejjiraphatchandej/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- bundler/setup
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/boot.rb:3:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/config/application.rb:1:in `<top (required)>'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `require_relative'
/Users/teerasejjiraphatchandej/Desktop/SP/spfarm-project/Rakefile:4:in `<top (required)>'
/Users/teerasejjiraphatchandej/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

กด Link ใน Nav bar แล้วไอคอนหาย

กด link แล้วเปิดไปอีกหน้า ไอคอนมันหายไป ตรงนี้ไม่แน่ใจว่า มันมีอะไรไปขัดกับกลไกของ Rails หรือเปล่า เพราะทั้งหมดเป็น CSS และไม่ได้ใช้ JS

กดไปดูตัวอย่าง https://ibb.co/k311hc

เจอ Error Uglifier ในการ deploy ขึ้น Heroku

หลังจากใส่ CSS แล้ว ตอนสั่ง deploy heroku

Uglifier::Error: Unexpected token: name (Util). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).

สังเกตว่า Error เกิดขึ้นในขั้นตอนรันคำสั่ง Running: rake assets:precompile
ตอนนี้ในการทดสอบรันคำสั่งเดียวกันในเครื่องปกติ ไม่เจอ error ทั้ง @rhearnorth และของพล

มีคำแนะนำวิธีแก้ไขที่ lautis/uglifier#127 แต่ยังทดสอบไม่ได้ เพราะติดปัญหาอื่น

Log เต็มๆ

 Personal    desolate-basin-65162
Overview  Resources  Deploy  Metrics  Activity  Access  Settings
Activity Feed  Build Log ID e692807d-96ca-466a-bd26-c5281bc3c01f
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.1
-----> Installing dependencies using bundler 1.15.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
       Fetching gem metadata from https://rubygems.org/........
       Fetching version metadata from https://rubygems.org/..
       Fetching dependency metadata from https://rubygems.org/.
       Using concurrent-ruby 1.0.5
       Using minitest 5.11.1
       Using thread_safe 0.3.6
       Using builder 3.2.3
       Using erubi 1.7.0
       Using mini_portile2 2.3.0
       Using crass 1.0.3
       Using rack 2.0.3
       Using rake 12.3.0
       Using nio4r 2.2.0
       Using websocket-extensions 0.1.3
       Using mini_mime 1.0.0
       Using arel 8.0.0
       Using execjs 2.7.0
       Using method_source 0.9.0
       Using thor 0.19.4
       Using kaminari-core 1.1.1
       Using rb-fsevent 0.10.2
       Using ffi 1.9.18
       Using tilt 2.0.8
       Using selectize-rails 0.12.4.1
       Using aws_cf_signer 0.1.3
       Using bcrypt 3.1.11
       Using popper_js 1.12.9
       Using bundler 1.15.2
       Using json 1.8.6
       Using mime-types-data 3.2016.0521
       Using mimemagic 0.3.2
       Using unf_ext 0.0.7.4
       Using netrc 0.11.0
       Using coffee-script-source 1.12.2
       Using orm_adapter 0.5.0
       Using dotenv 2.2.1
       Using high_voltage 3.0.0
       Using multi_json 1.12.2
       Using pg 0.21.0
       Using puma 3.11.0
       Using turbolinks-source 5.0.3
       Using i18n 0.9.1
       Using tzinfo 1.2.4
       Using nokogiri 1.8.1
       Using rack-test 0.8.2
       Using sprockets 3.7.1
       Using warden 1.2.7
       Using mail 2.7.0
       Using autoprefixer-rails 7.2.4
       Using uglifier 4.1.2
       Using websocket-driver 0.6.5
       Using rb-inotify 0.9.10
       Using mime-types 3.1
       Using coffee-script 2.4.1
       Using unf 0.1.4
       Using turbolinks 5.0.1
       Using activesupport 5.1.4
       Using loofah 2.1.1
       Using sass-listen 4.0.0
       Using domain_name 0.5.20170404
       Using rails-dom-testing 2.0.3
       Using globalid 0.4.1
       Using activemodel 5.1.4
       Using jbuilder 2.7.0
       Using pundit 1.1.0
       Using rails-html-sanitizer 1.0.3
       Using sass 3.5.5
       Using http-cookie 1.0.3
       Using activejob 5.1.4
       Using activerecord 5.1.4
       Using carrierwave 0.11.2
       Using actionview 5.1.4
       Using rest-client 2.0.2
       Using kaminari-activerecord 1.1.1
       Using actionpack 5.1.4
       Using kaminari-actionview 1.1.1
       Using cloudinary 1.8.2
       Using actioncable 5.1.4
       Using actionmailer 5.1.4
       Using railties 5.1.4
       Using sprockets-rails 3.2.1
       Using kaminari 1.1.1
       Using momentjs-rails 2.17.1
       Using jquery-rails 4.3.1
       Using coffee-rails 4.2.2
       Using responders 2.4.0
       Using dotenv-rails 2.2.1
       Using bootstrap 4.0.0.beta3
       Using bourbon 4.3.4
       Using sass-rails 5.0.7
       Using rails 5.1.4
       Using datetime_picker_rails 0.0.7
       Using devise 4.4.0
       Using administrate 0.8.1
       Using devise_invitable 1.7.2
       Bundle complete! 45 Gemfile dependencies, 92 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into ./vendor/bundle.
       Bundle completed (3.47s)
       Cleaning up the bundler cache.
       Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
       The latest bundler is 1.16.1, but you are currently running 1.15.2.
       To update, run `gem install bundler`
-----> Installing node-v6.11.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Yarn executable was not detected in the system.
       Download Yarn at https://yarnpkg.com/en/docs/install
       rake aborted!
       Uglifier::Error: Unexpected token: name (Util). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/uglifier-4.1.2/lib/uglifier.rb:236:in `parse_result'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/uglifier-4.1.2/lib/uglifier.rb:218:in `run_uglifyjs'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/uglifier-4.1.2/lib/uglifier.rb:168:in `compile'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in `call'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in `call'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
       /tmp/build_56936c9f1deb4f20e844ea2f278265c0/vendor/bundle/ruby/2.3.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

Tooltips ของ Theme ใน Nav ไม่ขึ้น

สืบเนื่องจาก Pull Request #9

การจะทำให้ Tooltips ขึ้น เหมือนจะต้องใช้ไฟล์ JS ของ theme มาใช้ด้วย ซึ่งมันเป็นไฟล์ JS ที่มีการโหลดแบบเรียงลำดับ

<script src="../assets/js/jquery.min.js"></script>
   <script src="../assets/js/popper.min.js"></script>
   <script src="../assets/js/chart.js"></script>
   <script src="../assets/js/tablesorter.min.js"></script>
   <script src="../assets/js/toolkit.js"></script>
   <script src="../assets/js/application.js"></script>

ตัวอย่าง Tooltips
Screen_Shot_2018_02_20_at_12_13_54

ทางเลือก
A. ทำต่อ แต่ตรงนี้อยากรู้วิธีโหลดไฟล์ js แยก และกำหนดลำดับได้ ไม่ใช่แบบอัตโนมัติที่ Rails ทำให้อยู่
และจะมีปัญหาแบบ #8 ที่ Uglifty error ตอน deploy หรือเปล่า?
B. ไม่จำเป็น ตัดออก?

อยากได้วิธีที่จะ custom HTML สำหรับหน้าที่ Ruby on Rails สร้างอัตโนมัติ

จากที่หาน่าจะเกี่ยวข้องกับการตั้งชื่อไฟล์ HTML ใหม่ใน folder ที่ถูกต้อง แต่ไม่แน่ใจ แนะแนวที่อ่านง่ายๆ ตรงจุดก็ดีนะจ๊ะ

เป้าหมายคือ อยากได้ไฟล์ HTML สำหรับแต่ละหน้าที่สร้างขึ้นโดยระบบอัตโนมัติ ทำให้ไม่มีไฟล์ HTML จริงๆ ไว้ปรับแต่ง Layout

อันนี้พอหามาได้ แต่ไม่แน่ใจว่าถูกไหม เพราะปกติจะแก้จากไฟล์ HTML ที่เห็น

ต้องการข้อมูล URL ที่จะเอามาใส่หน้า sale ที่กดแล้วจะลิ้งค์มาที่หน้า dashboard

อยากได้ pattern ของ URL ที่จะต้องเอาไปวางใน package แต่ละตัวของหน้า sale

2018_02_14_09_59_32

แล้วมาโผล่หน้า summary contract (หรือเรียกว่าอะไรสักอย่าง) ก่อนที่จะกดปุ่ม Buy หน่ะ

ทำใส่ doc สักอันก็ได้

ส่วน Headlink ของ SP Dashboard ต้องกำหนดลิ้งค์แบบไหน ถึงจะกลับไปหน้าหลักของ User หรือ Admin คนนั้นๆ ได้?

ส่วนนี้ไม่รู้วิธีกำหนด link ของ RoR ที่จะทำให้ไปเชื่อมกับระบบ Routing (คิดว่าเรียกแบบนี้นะ)

โดยคิดว่าเราต้องพาไปหน้าหลัก ที่แตกต่างกันของแต่ละ Role
ต้องจัดการที่ Router หรือเปล่านะ?

Screen_Shot_2018_02_11_at_18_26_23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.